Skip to content

Instantly share code, notes, and snippets.

View bwesterb's full-sized avatar
⚛️

Bas Westerbaan bwesterb

⚛️
View GitHub Profile
@bwesterb
bwesterb / output-of-maried
Created May 5, 2011 21:19
Output of bwesterb/maried after dual upload on empty repository
74018 DEBUG cometServer.12:OPTIONS
74019 INFO cometServer.12:Request: 200 None
74019 INFO cometServer.13:Accepted connection from ('192.168.1.2', 49206)
74021 DEBUG cometServer.13:OPTIONS
74021 INFO cometServer.13:Request: 200 None
74313 INFO cometServer.14:Accepted connection from ('192.168.1.2', 49207)
74316 INFO cometServer.0yPWzZFY:Download started
74400 INFO cometServer.15:Accepted connection from ('192.168.1.2', 49208)
74402 INFO cometServer.0yPWzZFY:Download started
78602 WARNING mediaStore:Duplicate file b6cc27ec2a587df05504da8684eafa7f2412d6c82c063190192d8ff6a64102a873d832e9d99d9e273da4ea9031874c7aea19a803a589563c05a6686b46c978db
@bwesterb
bwesterb / gist:1082355
Created July 14, 2011 12:26
JavaScript Quine
phi = function(c) {
return eval("("+c+")").apply(null,
Array.prototype.slice.call(arguments, 1));
};
s11 = function(c, x) {
return "function(){"+
"return ("+c+").apply(null,["+
JSON.stringify(x)+"].concat("+
"Array.prototype.slice.call(arguments,0)));"+
@bwesterb
bwesterb / gist:1085773
Created July 15, 2011 23:26
Analysing space filling curves
from math import sin, cos, pi, sqrt, log
import random
import Image
import ImageDraw
algs = (('gosper', 'x', 6, {
'x': 'x+yf++yf-fx--fxfx-yf+',
'y': '-fx+yfyf++yf+fx--fx-y'}),
('square', 'x', 4, {
'x': 'xf-f+f-xf+f+xf-f+f-x'}),
@bwesterb
bwesterb / gist:1258966
Created October 3, 2011 12:05
Exploit of (patched) leak in printbudget of Radboud Universiteits FNWI's C&CZ's printbudget
from ptrace.debugger import PtraceDebugger
from ptrace.debugger.child import createChild
from ptrace.tools import locateProgram
from ptrace.func_call import FunctionCallOptions
class Program(object):
def waitForSyscall(self, name, withResult=False):
while True:
self.process.syscall()
self.process.waitSyscall()
@bwesterb
bwesterb / zuid.mirte
Created March 7, 2012 20:35
zuid.mirte for zuidslet.science.ru.nl
# Base configuration of marietje zuid
includes:
- maried/classic
- maried/gstreamer
- sarah/log
- sarah/shell
- maried/ajax/ajax
- maried/lastfm
- maried/bertha
instances:
@bwesterb
bwesterb / gist:2032759
Created March 13, 2012 23:50
nmap -T insane -sS kassala.de
$ nmap -T insane -sS kassala.de
Starting Nmap 5.21 ( http://nmap.org ) at 2012-03-14 00:50 CET
Nmap scan report for kassala.de (88.198.13.151)
Host is up (0.017s latency).
Not shown: 981 closed ports
PORT STATE SERVICE
7/tcp filtered echo
22/tcp open ssh
25/tcp filtered smtp
@bwesterb
bwesterb / gist:2277083
Created April 1, 2012 17:03
Failing gapless playback with pygst
import pygst
pygst.require("0.10")
import gst
import sys
import gobject
class Player:
def __init__(self, filename):
self.filename = filename
self.player = gst.element_factory_make("playbin2", "player")
@bwesterb
bwesterb / gist:3332093
Created August 12, 2012 14:35
Analyze Sparrow's Tokyo Cabinet
import tc
import os.path
import pprint
db = tc.HDB()
db.open(os.path.expanduser(
'~/Library/Containers/com.sparrowmailapp.sparrow/Data/Library/'+
'Application Support/Sparrow/[email protected]/'+
'data.db/data.tch'), tc.HDBOREADER )
diff -r 530cb0bd2428 pypy/jit/backend/arm/codebuilder.py
--- a/pypy/jit/backend/arm/codebuilder.py Thu Jan 24 18:30:38 2013 +0100
+++ b/pypy/jit/backend/arm/codebuilder.py Thu Jan 24 20:08:12 2013 +0100
@@ -1,5 +1,5 @@
from pypy.jit.backend.arm import arch
-from pypy.jit.backend.arm import conditions as cond
+from pypy.jit.backend.arm import conditions
from pypy.jit.backend.arm import registers as reg
from pypy.jit.backend.arm.arch import (WORD, FUNC_ALIGN)
from pypy.jit.backend.arm.instruction_builder import define_instructions
root@wheezy:~/pypy# python pypy/jit/backend/arm/test/test_assembler.py
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-2.0-beta2-6/gcctest.c -o /tmp/usession-release-2.0-beta2-6/gcctest.o
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-2.0-beta2-6/module_cache/module_0.c -o /tmp/usession-release-2.0-beta2-6/module_cache/module_0.o
[platform:execute] gcc -shared /tmp/usession-release-2.0-beta2-6/module_cache/module_0.o -pthread -Wl,--export-dynamic,--version-script=/tmp/usession-release-2.0-beta2-6/dynamic-symbols-0 -lrt -o /tmp/usession-release-2.0-beta2-6/shared_cache/externmod.so
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-2.0-beta2-6/platcheck_5.c -o /tmp/usession-release-2.0-beta2-6/platcheck_5.o
[libffi:WARNING] 'libffi.a' not found in []
[libffi:WARNING] trying to use the dynamic library instead...