Skip to content

Instantly share code, notes, and snippets.

View winny-'s full-sized avatar
👋
***status goes here***

Winston (Winny) Weinert winny-

👋
***status goes here***
View GitHub Profile
@azubkokshe
azubkokshe / gist:e26cb34e3e836356106a470ce9fcf674
Last active August 23, 2024 20:03
Write all tmux scrollback to a file
  1. Use prefix + :, then type in capture-pane -S -3000 + Return. (Replace -3000 with however many lines you'd like to save, or with - for all lines.) This copies those lines into a buffer.
  2. Then, to save the buffer to a file, just use prefix + : again, and type in save-buffer /home/{user}/filename.txt + return.

(By default Prefix is Ctrl+B.)

Managing firewalld

firewall-cmd --state     # Display whether service is running
firewall-cmd --reload    # To reload the permanent rules without interrupting existing persistent connections

list details of default and active zones

firewall-cmd --get-default-zone
#lang racket/base
(define (signed-var-int val)
(cond
[(bitwise-bit-set? val 31)
(bitwise-ior val (bitwise-not #xffffffff))]
[else
val]))
(define (read-var-int in)
@HappyCodingRobot
HappyCodingRobot / 61-hp-mic-mute-hotkey.hwdb
Created January 8, 2019 14:22
Activate mic mute function key, ubuntu 18.04, HP Elitebook 820
# see also: /lib/udev/hwdb.d/60-keyboard.hwdb
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*EliteBook*:pvr*
KEYBOARD_KEY_81=f20 # Fn+F8 on Elitebook, map to F20
# KEYBOARD_KEY_81=fn_esc # org entry
@krisleech
krisleech / renew-gpgkey.md
Last active December 29, 2024 05:01
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@JBlond
JBlond / bash-colors.md
Last active January 2, 2025 06:32 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active January 4, 2025 09:00
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@cryzed
cryzed / fix-infinality.md
Last active December 31, 2024 15:00
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@Nilpo
Nilpo / BIND for the Small LAN.md
Last active January 6, 2025 16:51
How to configure BIND 9 to act as a caching nameserver or as the nameserver for a local domain.
@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active December 28, 2024 14:28
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)