Misc

code

My C++ Quine

I recently tried to compile this and it fails since GNU CPP has deprecated their multiline string literal extension.

#include <iostream.h>
#define Q(a)main(){char*s=a#a;cout<<s+2<<s[0]<<s[1];}
Q(")
#include <iostream.h>
#define Q(a)main(){char*s=a#a;cout<<s+2<<s[0]<<s[1];}
Q(")

Mersenne Twister in SML

Program to filter uniq ips from a file

simple self modifying c (x86 only)

mmap 0 to "(null)" so printf("%s",0) works

run stuff without a console window, for cygwin

Very simple Apache 1.3 module to deny the TRACE/PUT/DELETE methods

Clear cmos passwords

Simple example of C++ with PCRE and OTL to populate a database

Fibonacci in a few languages