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
#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 April 22, 2024 20:13
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:

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 23, 2024 15:35
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 January 19, 2024 08:56
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 17, 2024 16:34
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 April 19, 2024 16:03
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)
@CMCDragonkai
CMCDragonkai / nix_string_and_path_concatenation.md
Last active March 15, 2024 00:21
Nix: String and Path Concatenation #nix #nixos

Nix String and Path Concatenation

From Bas van Dijk:

To understand these things I would recommend using nix-repl:

$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
@alces
alces / ansible_local_playbooks.md
Last active April 5, 2024 18:28
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@dpalomar
dpalomar / .gitattributes
Created April 8, 2016 12:43
Fixing CRLF with gitattributes
From this [issue](https://github.com/puphpet/puphpet/issues/1025#issuecomment-157059174):
I know that this issue is closed, but as I spent a lot of time to understand what was going on, I made some researches and I can explain why this happen, and you can fix it.
Using git config core.autocrlf true can help, but not on a multi-developpers project.
This command has to be the same on each developper machine, and that's not always the case.
You have to use the .gitattributes provided in the puphpet archive and edit it as follow (carefull, this file need to be in your project root)
You also need to use an IDE that allow you to save/edit files as LF (like phpstorm). You can check the type of the file in the bottom right corner, in the status bar (you'll see LF or CRLF while a file is opened)