Skip to content

Instantly share code, notes, and snippets.

View theonewolf's full-sized avatar

Wolfgang Richter theonewolf

View GitHub Profile
# du -shx /*
9.1M /bin
23M /boot
164K /dev
6.1M /etc
104M /home
0 /initrd.img
0 /initrd.img.old
128M /lib
0 /lib64
# sfdisk -d /dev/sda
# partition table of /dev/sda
unit: sectors
/dev/sda1 : start= 63, size= 326641473, Id=83
/dev/sda2 : start= 0, size= 0, Id= 0
/dev/sda3 : start=326641649, size= 8960015, Id=82
/dev/sda4 : start= 0, size= 0, Id= 0
@theonewolf
theonewolf / Chromium Browser about:*
Created March 22, 2011 00:52
Documenting about:*
about:
about:appcache-internals
about:blank
about:cache
about:config
about:crash
about:dns
about:kill
about:credits
about:flags
@theonewolf
theonewolf / Off-by-one Recruitment
Created April 7, 2011 22:24
Following the cycle...
Richter -> Samadi -> Shafer -> Sheffet -> Slyper -> Stanton -> Tangwonsan
Renshaw -> Rosenthal
@theonewolf
theonewolf / Performance Data
Created April 25, 2011 21:52
perf stat on _best_ and _malloc_
Performance counter stats for './test_hash_best':
1875.329076 task-clock-msecs # 1.098 CPUs
561 context-switches # 0.000 M/sec
42 CPU-migrations # 0.000 M/sec
44797 page-faults # 0.024 M/sec
4943793781 cycles # 2636.227 M/sec
7382867149 instructions # 1.493 IPC
5901980 cache-references # 3.147 M/sec
489832 cache-misses # 0.261 M/sec
200:test_hash_best.cpp **** result = hashtable.insert(std::make_pair(next_key, 1));
1026 .loc 3 200 0
1027 0596 8D45AC leal -84(%ebp), %eax
1028 0599 C7442408 movl $1, 8(%esp)
1028 01000000
1029 05a1 8B55D0 movl -48(%ebp), %edx
1030 05a4 89542404 movl %edx, 4(%esp)
1031 05a8 890424 movl %eax, (%esp)
1032 05ab E8FCFFFF call _ZSt9make_pairIPciESt4pairIT_T0_ES2_S3_
@theonewolf
theonewolf / gist:1054395
Created June 29, 2011 17:40
Great Poem :)
When things go wrong, as they sometimes will,
When the road you're trudging seems all uphill,
When the funds are low and the debts are high,
And you want to smile, but you have to sigh,
When care is pressing you down a bit,
Rest, if you must, but don't you quit.
Life is queer with its twists and turns,
As every one of us sometimes learns,
And many a failure turns about,
@theonewolf
theonewolf / gist:1276454
Created October 10, 2011 20:39
Flask, wrapped, multi-route example
# Add in PATH_INFO to the C code, and try running this script and replace the PATH_INFO to exercise the different URIs allowed:
#!/usr/bin/env python
#
# This script shows how to use Flask within a WSGI wrapper for CGI.
# Flask is a WSGI framework, so we need to translate CGI into WSGI.
#
# Authors: Athula Balachandran <abalacha@cs.cmu.edu>,
# Charles Rang <rang@cs.cmu.edu>,
@theonewolf
theonewolf / gist:1276492
Created October 10, 2011 20:51
mod_wsgi example
WSGIScriptAlias /qrapp /home/wolf/Dropbox/Projects/StealthQRApp/src/qrapp.wsgi
<Directory /home/wolf/Dropbox/Projects/StealthQRApp/src>
Order allow,deny
Allow from all
</Directory>
@theonewolf
theonewolf / gist:1277064
Created October 11, 2011 01:43
A little something like this...
Python
from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'