Skip to content

Instantly share code, notes, and snippets.

View nkoehring's full-sized avatar

Norman nkoehring

View GitHub Profile
@nkoehring
nkoehring / lock.sh
Last active December 27, 2015 16:39
simple but fancy screen locker? now even faster image creation!
#!/bin/sh
# the lock-icon I use can be found at http://koehr.in/img/lock-icon.png and is derived from
# http://icons.iconarchive.com/icons/visualpharm/icons8-metro-style/512/Very-Basic-Lock-icon.png
TMP=/tmp
XWD=$TMP/lock-${USER}.xwd
IMG=$TMP/lock-${USER}.png
LOCK=$HOME/images/lock-icon.png
@nkoehring
nkoehring / isso_error.txt
Created November 2, 2015 21:38
isso python error
Traceback (most recent call last):
File "/usr/bin/isso", line 9, in <module>
load_entry_point('isso==0.9.10', 'console_scripts', 'isso')()
File "/usr/lib/python3.5/site-packages/isso/__init__.py", line 259, in main
from gevent.pywsgi import WSGIServer
File "/usr/lib/python3.5/site-packages/gevent/__init__.py", line 41, in <module>
from gevent.hub import get_hub, iwait, wait
File "/usr/lib/python3.5/site-packages/gevent/hub.py", line 289
except Exception, ex:
^
@nkoehring
nkoehring / gist:3906074
Created October 17, 2012 15:12
output and archive mbox file
#!/bin/sh
MBOX=/var/mail/$USER
ARCHIVE=$HOME/$USER.mbox
touch $ARCHIVE
cat $MBOX >> $ARCHVE
cat $MBOX
rm $MBOX
touch $MBOX
@nkoehring
nkoehring / spyhacker.md
Created April 18, 2012 15:07
Senior Python Hacker

#Open Position "Senior Python Hacker Berlin"

For a stealth high-tech cloud startup in Berlin, I am searching for a capable member for our team of backend hackers. The main tasks would be writing tools for automation, deployment and scaling of multiple cloud providers. We are also working on Big Data, where the tasks are mostly data mining and processing (Map/Reduce).

In general, it is a technically very challenging high-tech position. That’s why we are looking for experienced backend hackers with a flexible mindset and skills in software design, coding and server administration (in the ratio of 10:70:20) and a reputation in the open source community.

Required professional experience:

  • Python and another web language
  • Amazon Web Services & other cloud providers
@nkoehring
nkoehring / gist:2264893
Created March 31, 2012 13:51
compiling problem with hathor
cd libhathor/ && make -f Makefile
make[1]: Entering directory `/home/nk/.tmp/yaourt-tmp-nk/aur-hathor-svn/src/hathor-svn-1/l
ibhathor'
make[1]: Für das Ziel »first« ist nichts zu tun.
make[1]: Leaving directory `/home/nk/.tmp/yaourt-tmp-nk/aur-hathor-svn/src/hathor-svn-1/li
bhathor'
cd local-plugin/ && make -f Makefile
make[1]: Entering directory `/home/nk/.tmp/yaourt-tmp-nk/aur-hathor-svn/src/hathor-svn-1/l
ocal-plugin'
make[1]: Für das Ziel »first« ist nichts zu tun.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <pthread.h>
#define PIPS 20
#define DICE 5
#define ITERATIONS 10000000
#define THREADS 2
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define PIPS 20
#define DICE 5
#define ITERATIONS 100000000
float roll(int pips, int dice, int iterations, int *result) {
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define PIPS 20
#define DICE 5
#define ITERATIONS 1000000
void roll(int pips, int dice, int iterations, int *result) {
Vorname Nachname Ort, den 27.08.08
Musterstraße 1
12345 Musterstadt
BSB Service GmbH
Daimlerstraße 9-11
#include <stdlib.h>
#include <time.h>
int main(void) {
srand(time(0));
return (rand()%5)+1;
}