This file contains hidden or 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 python | |
import sys | |
import errno | |
import ctypes | |
try: | |
libc = ctypes.CDLL('libc.dylib') | |
except OSError: | |
libc = ctypes.CDLL('/lib/libc.so.6') |
This file contains hidden or 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
from struct import * | |
from ctypes import * | |
from win32con import * | |
from win32clipboard import * | |
from win32api import * | |
from ctypes import create_string_buffer as bytes | |
gdip = windll.gdiplus | |
kernel32 = windll.kernel32 | |
jpegFmtGuid = pack("IHHBBBBBBBB", 0xb96b3cae, 0x0728, 0x11d3, 0x9d, |
This file contains hidden or 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
function pgrep () | |
{ | |
ps auxwww | | |
grep -e "$1" | | |
grep -v grep | | |
sed 's@[ ] *@ @' | | |
cut -d' ' -f2 | |
} | |
This file contains hidden or 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
/* Buzz bookmarklet, this should work on older browsers*/ | |
var e=encodeURIComponent; | |
var b='http://www.google.com/buzz/post'; | |
var u=e(document.location.href); | |
var els=document.getElementsByTagName('meta'); | |
var o=null; | |
for(var i=0;i<els.length;i++){ | |
if(els[i].name=='description'){ | |
o=els[i]; |
This file contains hidden or 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
class Position { int x = 0; int y = 0; } | |
class Delta { int dx = 0; int dy = 0; } | |
class RectArea | |
{ | |
Position position = new Position(); | |
Delta delta = new Delta(); | |
color fillColor; | |
int opacity; | |
This file contains hidden or 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
abstract class Classification { | |
double frequency() | |
boolean isComplete() | |
boolean isPartial() | |
... | |
class Complete extends Classification ... | |
class Partial extends Classification ... | |
class Partialish extends Classification ... | |
class Nothing extends Classification ... |
This file contains hidden or 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
$ ./osstatus -108 | |
Error number: -108 / 0xffffff94 | |
Error string: memFullErr / iMemFullErr | |
Error description: Not enough room in heap zone / |
This file contains hidden or 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
// Tested on http://blip.fm/home page | |
// Works | |
(function() { | |
var evt = document.createEvent("MouseEvents"); | |
evt.initMouseEvent("click", true, true, window, | |
0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
var cb = document.getElementById("prevPageLinkTop"); | |
cb.dispatchEvent(evt); | |
})() |
This file contains hidden or 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 <cstdio> | |
struct klass1 | |
{ | |
bool operator!() { return false; } | |
}; | |
struct klass2 | |
{ | |
klass1 operator!() { return klass1(); } |
This file contains hidden or 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
// Paste in to JavaScript console | |
function killzergs() | |
{ | |
var zergs = document.getElementsByClassName("zr_zergling_container"); | |
for(x = 0; x < zergs.length; x = x + 1) { | |
var evt = document.createEvent("HTMLEvents"); | |
evt.initEvent('mousedown', true, true ); | |
zergs[x].dispatchEvent(evt); | |
var evt = document.createEvent("HTMLEvents"); | |
evt.initEvent('mouseup', true, true ); |
OlderNewer