Skip to content

Instantly share code, notes, and snippets.

@svenk
svenk / PyPunchcards
Last active January 24, 2016 18:07
Proposal for Punchcard modeling in Python
This gist was an experiment to explore ways to model punch cards with Python nicely.
Focus was spent on good reability/introspection and fault tolerance (incomplete
punch cards/tristates) and not on performance.
@svenk
svenk / generate_blankpdf.sh
Last active March 25, 2021 20:48
Insert blank (white) pages between each page in a PDF file from shell
#!/bin/bash
base64 -d <<BASE | gunzip > blank.pdf
H4sICAEz+lIAA2JsYW5rLnBkZgCNVE1P20AQpa16WXEk970goCXsh712XCGkxB8RIgiU5ECbcjDO
AqHBRs66Cr32RvsTKvXSX1CpVZF6Kn+g6qWnnntHcO9snJCUILWW7PW+ed55b2bk+W0vKLIVE81f
fLj4evH54j3imOJk7witrpKajA/UITYAqZOg01UyJUE3VNKTUdKWa2uop1IZHqP+O+O70Vz8/ahJ
t+nMx1px8/rt3HJt9np57qx+/u3T3OWX+wVUuNr99Xqz8ONN4co9q809vyzcP58JH87+RDJuD0+C
N50cGUMVlnEDmWNhzdMTSXa29o5kpBBpZHtKA0GSHiNSqST9Fi462OQUW9TU6wrDu4hU0yQ7ga8b
pJmGce8kTGUcnRK3QTz5shPJerVCNrBKM+1sZL6E7nCOJq0/mIHr3h0exFiwW8Z0RSCMMYnCwSuc
MOLZN7xJtDT+OkhihTWrjkaudRFS8KZBrdbvq2pDgUAI+NWGwGIU2U6TqCFVi0CrSVP2FVk/Dg+k
@svenk
svenk / website-notify.sh
Created July 22, 2013 08:48
A website change checker / detection changer / script to keep track of changes of any website (URL). Intended to be run on a 24/7 running server like a login server in your university institute.
#!/bin/bash
#
# Notify when website changes-script:
# This is a simple mini program that informs you whenever a website
# changes. Can perform any job when triggered.
# Usage:
# ./notify "jobname fuer mail" "http://abc.def/interessant.html"
# The script will run "in foregrund". You can e.g. use GNU screen to detach it
# and run it in the background on a 24h-running-server:
# $ screen
@svenk
svenk / demo.sh
Created May 28, 2013 08:56
Das Bash-1x1 für den theoretischen Physiker, der C(pp) mit GCC programmiert
# Begrifflichkeiten: Shell = Kommandozeile Linux, Bash = Verbreitestes Shell-Programm
Angenommen du hast ein C++-File namens "hello.cc"
#include <stdio.h>
int main() {
printf("Hallo Welt\n");
return 0;
}