Skip to content

Instantly share code, notes, and snippets.

Raphael Michel raphaelm

View GitHub Profile
raphaelm /
Created Mar 20, 2018
NanoCDN Storage driver
import hashlib
import urllib.parse
import os
from io import BytesIO, StringIO
import requests
from django.conf import settings
from django.core.exceptions import SuspiciousFileOperation
from django.core.files import File
raphaelm /
Last active Dec 22, 2015 — forked from P3nny/
Wichtel-Programm für die Familienweihnachtsfeier
# -*- coding: UTF-8 -*-
# Patricia Ennenbach - 15-12-21 - Wichteln
# Aufgaben:
# - Jedes Kind soll einem Kind etwas schenken
# - Kinder sollen sich nicht selbst beschenken
# - Kinder sollen nicht ihre Geschwister beschenken
# - Jedes Kind soll nur einmal beschenkt werden
# Ich habe den Hauptteil relativ stark verändert, aus zwei Gründen:
# * Du hast die Liste "kinder" bearbeitet, während du in einer Schleife
raphaelm /
Last active Nov 26, 2019 ansible role

Step zero: Install this role by creating the directories roles/letsencrypt/, roles/letsencrypt/files/ and roles/letsencrypt/tasks/. Then save the tasks.yml from this gist as roles/letsencrypt/tasks/main.yml and from this gist as roles/letsencrypt/files/

Step one: Add the following to your nginx server config

location /.well-known/acme-challenge {
    root /var/www/letsencrypt;

Step two: Execute the ansible role, e.g. using

#!/usr/bin/env python
All credit goes to
Check all existing Docker containers for their mapped paths, and then purge any
zombie directories in docker's volumes directory which don't correspond to an
existing container.
raphaelm /
Last active Aug 29, 2015
GPN14 CTF WriteUp

Keybase proof

I hereby claim:

  • I am raphaelm on github.
  • I am raphaelm ( on keybase.
  • I have a public key whose fingerprint is 6654 0831 7895 7043 9A44 C80D 4F70 B444 E1C6 8BA1

To claim this, I am signing this object:

raphaelm /
Created Aug 19, 2013
EasyMoney (Android expense tracker) backup files are obfuscated. This script decrypts them and stores the data in an SQLite3 file (just like it is stored on the Android device).
#!/usr/bin/env python3
import sys
import re
import sqlite3
import os.path
INFILE = sys.argv[1]
OUTFILE = sys.argv[2]
View .zshrc
# History
zstyle :compinstall filename '/home/raphael/.zshrc'
# Load colors
autoload -U colors && colors
raphaelm /
Last active Dec 12, 2015
Checks whether it is possible to compose a given name out of chemical element symbols, like Caroline out of Carbon (C), Argon (Ar), Oxygen (O), Lithium (Li) and Neon (Ne).
#!/usr/bin/env python
# Checks whether it is possible to compose a given name out of chemical
# element symbols, like Caroline out of Carbon (C), Argon (Ar), Oxygen (O)
# Lithium (Li) and Neon (Ne).
# The implementation consists of a simple backtracking algorithm.
raphaelm / my_i3status.bash
Created Dec 28, 2012
Thinkpad X230 mic mute button status displayed in i3status, because even though you can make the button function via an ACPI event, it is impossible to use the button's LED with kernel 3.5 Requires: jshon
View my_i3status.bash
i3status | while :
read line
if [[ "$line" == *"full_text"* ]] ; then
if ! amixer sget 'Capture',0 | grep '\[on\]' > /dev/null 2>&1 ; then
if [[ "$line" == ","* ]]; then
echo -n ","
echo $line | sed s/^,//g | jshon -n object -i 0 -e 0 -s "name" -i "micmute" -s "mic muted" -i "full_text" -p | tr '\n' ' '
You can’t perform that action at this time.