This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# A quick and dirty implementation of an HTTP proxy server in Ruby | |
# because I did not want to install anything. | |
# | |
# Copyright (C) 2009-2014 Torsten Becker <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A small program to test address space layout randomization (ASLR) on Leopard, | |
by Torsten Becker <[email protected]>, 2009. | |
The presentation from a Apple guy at | |
http://www.slideshare.net/guest4c923d/jordan-hubbard-talk-lisa-presentation | |
suggests to compile with -pie but it doesn't work for me, I get the same | |
output every time which means it's not random, check it yourself: | |
$ gcc -fPIC -Wl,-pie aslr-test.c && ./a.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc not_nil.m -lObjC -framework Foundation && ./a.out | |
#include <stdio.h> | |
#include <stdarg.h> | |
#include <Cocoa/Cocoa.h> | |
@interface FooClass : NSObject | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -g -framework OpenGL -framework GLUT glextensions.c -o glextensions | |
#include <stdio.h> | |
#ifdef __APPLE__ | |
#include <OpenGL/gl.h> | |
#include <GLUT/glut.h> | |
#else | |
#include <GL/gl.h> | |
#include <GL/glut.h> | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a,b="a,b=",";puts a+a.inspect+','+b.inspect+b";puts a+a.inspect+','+b.inspect+b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/sysctl.h> | |
#include <unistd.h> | |
#include <err.h> | |
#include <errno.h> | |
#include <stdio.h> | |
int main() | |
{ | |
int mib[4]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
untar() { | |
ruby -e 'f=$*[0];exec"tar","#{f=~/gz$/?"z":(f=~/bz2?$/?"j": | |
(raise"Incompatible Archive File"))}vxf",f' -- "$@" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch() { | |
ruby -e 'u=$*[0];q=39.chr;exec %Q{curl #{q+u+q} > \ | |
#{q+u.gsub(%r{^.+/},"")+q}}' -- "$1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET = "iphone-nano" | |
TEMPLATE = app | |
QT = core gui | |
CONFIG += warn_on | |
HEADERS = src/IPhoneFrameWidget.h src/MainWindow.h src/helpers.h src/apps/App.h src/apps/Menu.h src/apps/ClockApp.h src/apps/MusicApp.h src/apps/PhotoApp.h | |
SOURCES = src/main.cc src/IPhoneFrameWidget.cc src/MainWindow.cc src/helpers.cc src/apps/App.cc src/apps/Menu.cc src/apps/ClockApp.cc src/apps/MusicApp.cc src/apps/PhotoApp.cc | |
INCLUDEPATH += src |
OlderNewer