Skip to content

Instantly share code, notes, and snippets.

View theonewolf's full-sized avatar

Wolfgang Richter theonewolf

View GitHub Profile
@theonewolf
theonewolf / hiredis.diff
Created January 30, 2014 01:36
hiredis hack to handle user context on connect/disconnect callbacks
diff --git a/async.c b/async.c
index 923a329..a3fc05f 100644
--- a/async.c
+++ b/async.c
@@ -127,8 +127,13 @@ static redisAsyncContext *redisAsyncInitialize(redisContext *c) {
ac->ev.delWrite = NULL;
ac->ev.cleanup = NULL;
- ac->onConnect = NULL;
- ac->onDisconnect = NULL;
@theonewolf
theonewolf / Makefile
Last active August 29, 2015 13:55
UDP OS X exploration
default:
clang udp.c -o udp
clean:
rm udp
@theonewolf
theonewolf / pushme
Created January 31, 2014 17:56
test push ability
stuff
@theonewolf
theonewolf / kern.log
Created April 7, 2014 16:44
coda lockup
Apr 6 21:40:38 gs9671 kernel: [ 43.018316] init: plymouth-stop pre-start process (2575) terminated with status 1
Apr 7 11:35:48 gs9671 kernel: [50152.946628] coda_read_super: device index: 0
Apr 7 11:35:48 gs9671 kernel: [50152.947593] coda_read_super: rootfid is (00000001.ff000001.00000001.00000001)
Apr 7 11:35:48 gs9671 kernel: [50152.947938] coda_read_super: rootinode is 1049600 dev coda
Apr 7 11:42:14 gs9671 kernel: [50538.867095] coda: Venus dead, not sending upcall
Apr 7 11:42:14 gs9671 kernel: [50538.867100] coda: Venus dead, not sending upcall
Apr 7 11:42:14 gs9671 kernel: [50538.867104] coda: Venus dead, not sending upcall
Apr 7 11:42:15 gs9671 kernel: [50540.290824] coda: Venus dead, not sending upcall
Apr 7 11:42:15 gs9671 kernel: [50540.339017] coda: Venus dead, not sending upcall
Apr 7 11:42:16 gs9671 kernel: [50540.459311] coda: Venus dead, not sending upcall
@theonewolf
theonewolf / introspection_test.py
Created September 4, 2014 20:30
OpenStack Introspection API Test
#!/usr/bin/env python
from getpass import getpass
from logging import basicConfig, DEBUG, getLogger, INFO
from novaclient.v1_1 import client
from novaclient.exceptions import HTTPNotImplemented, NotFound
@theonewolf
theonewolf / swap.log
Created September 9, 2014 14:14
Bytes on Pristine Swap Partition
➜ tmp>truncate --size 1G testswap
➜ tmp>hexdump -C testswap
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
40000000
# Note the file starts as complete zeros
# Let's find out what happens when we "create/initialize" swap space
@theonewolf
theonewolf / Makefile
Created November 5, 2014 18:46
endian test program
endian-test: endian-test.c
gcc endian-test.c -o endian-test
@theonewolf
theonewolf / Makefile
Created November 6, 2014 07:33
off_t size test
default: off-test32 off-test64
off-test32: off-test32.c
gcc off-test32.c -o off-test32
off-test64: off-test64.c
gcc off-test64.c -o off-test64
@theonewolf
theonewolf / cherrypy-hello.py
Created November 7, 2014 21:29
benchmark sample
#!/usr/bin/env python
import cherrypy
from flask import Flask
from logging import ERROR, getLogger
app = Flask(__name__)
log = getLogger('werkzeug')
log.setLevel(ERROR)
@theonewolf
theonewolf / nbd.log
Created November 14, 2014 23:02
nbd testing
got flush.
got flush.
+ [1416005909289892] write size: 1024
write[1]: 1024 cumulative bytes (1024 B)
got flush.
got trim.
got trim.
got trim.
got trim.
got trim.