Skip to content

Instantly share code, notes, and snippets.

View davestevens's full-sized avatar

Dave Stevens davestevens

View GitHub Profile
@davestevens
davestevens / crap.c
Created May 27, 2011 19:15
3 Dimensional static array with pointer access
#include <stdio.h>
#define ONE 5
#define TWO 2
#define THREE 3
typedef struct {
unsigned int temp;
} rah;
@davestevens
davestevens / bandcamprip.js
Created April 25, 2011 21:13
Get links to music in bandcamp
javascript:(function(){
var TEMP = -1;
var HTML = '';
while(mine = TralbumData.trackinfo[++TEMP]) {
HTML += '<a href="' + mine.file + '" target="_blank">' + mine.title + '</a><br/>' + "\n";
}
var newdiv = document.createElement('div');
newdiv.setAttribute('id', 'helloWorld');
newdiv.style.background = "#000";
newdiv.innerHTML = HTML;
@davestevens
davestevens / perlObf.pl
Created April 15, 2011 16:04
Quick way to mangle variable names in a Perl script
#!/usr/bin/perl
# run with;
# perl perlObf.pl inputFile.pl > outpuFile.pl
use Digest::MD5 qw(md5_hex);
while( <> ) {
while(/([\$\%\@]#?)([A-Za-z]\w+)/gm) {
if($2 ne 'ARGV') {
#!/usr/bin/perl
# read from object file, output all variable names and types.
# object needs to be compiled with -g CFLAG
if($ARGV[0] eq '') {
print "need to specify an objectfile\n";
}
else {
$objfile = $ARGV[0];
@davestevens
davestevens / facebookFontSize
Created November 3, 2010 11:02
change facebook wall font size to something larger.
/* change Facebook wall font size
/* copy this into the javaConsole in your browser with facebook open
and press enter */
/* in Chrome this is opened by View | Developer | JavaScript Console
choose 'Console' (furthest right tab) and paste all of this in */
/* in Safari this is a bit trickier, you need to enable hidden debug
menu, in Terminal enter:
defaults write com.apple.Safari IncludeDebugMenu 1
Then restart Safari, open with Develop | Start Debugging JavaScript