Skip to content

Instantly share code, notes, and snippets.

View christophmeissner's full-sized avatar

Christoph Meißner christophmeissner

View GitHub Profile
@meehow
meehow / art.txt
Created June 21, 2011 10:03
ascii art
^__^ /
(oo)\_______/ _________
(__)\ )=( ____|_ \_____
||----w | \ \ \_____ |
|| || || ||
@chrismccoy
chrismccoy / gitcheats.txt
Last active July 16, 2024 11:44
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# count total commits in a repo
git rev-list --all --count
# edit all commit messages
git rebase -i --root
@phil-blain
phil-blain / .gitattributes
Last active March 29, 2024 22:38
Git pickaxe : show only relevant hunks (filter displayed hunks using the given search string)
*.md diff=markdown
@carlok
carlok / 0_export_public_key.py
Last active May 13, 2023 21:51 — forked from aellerton/0_export_public_key.py
Python sign message with private key and verify with public key
#!/usr/bin/env python
"""Extract the public key from the private key and write to a file.
"""
from Crypto.Hash import SHA256
from Crypto.Signature import PKCS1_v1_5
from Crypto.PublicKey import RSA
with open("private_key.pem", "r") as src:
private_key = RSA.importKey(src.read())