Skip to content

Instantly share code, notes, and snippets.

alxbnct /
Created March 14, 2022 16:09 — forked from MarcDiethelm/
How to contribute to a project on Github

This text now lives at I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

alxbnct /
Created April 19, 2022 08:21 — forked from nepsilon/
How to change your commit messages in Git? — First published in issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

alxbnct /
Last active May 27, 2022 02:46
Macro for printing variables in scheme

Very often we want to debug a program by printing variables, the following macro makes it easier and more convenient.

(define-syntax dbg
  (syntax-rules ()
    ((_ fst ...)
     (begin (let loop ((lst (list fst ...))
                       (symbol-names (map symbol->string (quote (fst ...)))))
              (if (not (null? lst))
                  (begin (display (string-append " " (car symbol-names) ": "))
                         (display (car lst))
alxbnct /
Created May 29, 2022 12:12 — forked from evantoli/
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

alxbnct / neomuttrc
Created May 31, 2022 00:28 — forked from VladimirPal/neomuttrc
Minimal neomutt config for gmail imap
View neomuttrc
set imap_user=""
set imap_pass=`/usr/bin/security find-generic-password -w -a '' -s 'Gmail'`
set folder=imaps://
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# search sleep_time for additional info
set sleep_time=0 # be faster
alxbnct /
Created June 14, 2022 06:31 — forked from krisleech/
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:

View xrectsel.c
#include<unistd.h> // added for sleep/usleep
// original from [ Select a screen area with mouse and return the geometry of this area? / Programming & Scripting / Arch Linux Forums]
// build with (Ubuntu 14.04):
// gcc -Wall xrectsel.c -o xrectsel -lX11
alxbnct /
Created July 9, 2022 06:07 — forked from joostrijneveld/
Producing printable QR codes for persistent storage of GPG private keys
# Heavily depends on:
# libqrencode (
# paperkey (
# zbar (
# Producing the QR codes:
# Split over 4 codes to ensure the data per image is not too large.
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp
split temp -n 4 IMG
for f in IMG*; do cat $f | qrencode -o $f.png; done
alxbnct /
Created July 11, 2022 03:30 — forked from F21/
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
alxbnct / gist:b3731647a8f7940f9891b839cc5b54ac
Created July 17, 2022 14:44 — forked from jatcwang/gist:ae3b7019f219b8cdc6798329108c9aee
List of all setxkbmap configuration options (including models/layout/etc)
View gist:b3731647a8f7940f9891b839cc5b54ac
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro