Instantly share code, notes, and snippets.

💭
Destablizing Authoritarian governments to ₿UIDL ₿ack ₿etter

# nolim1t - f6287b82CC84bcbd nolim1t

💭
Destablizing Authoritarian governments to ₿UIDL ₿ack ₿etter
Created May 19, 2009
View gist:114115
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
 -(NSDictionary *)readDatafile:(NSString *)plistfile { NSLog(@"Reading PLIST file %@", plistfile); return [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:plistfile ofType:@"plist"]]; }
Created May 27, 2009
View occurances.py
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
 def countwordsInString(string, delimiter, word): occurs = 0 stringarray = string.split(delimiter) for stringword in stringarray: if word == stringword: occurs = occurs + 1 return occurs
Created Jun 1, 2009
Count the number of occurances in a string
View gist:121282
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

Created Jun 2, 2009
View gist:121949
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

Created Jun 2, 2009
Strip out windows linebreaks
View gist:122068
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
 perl -pi -e "s/\r\n/\n/" $1 Created Jun 2, 2009 View gist:122092 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  connect('a.b.c.d', 11211);$memcache->set('test', 'This could be an array or an object (the methods wont get saved!', false, 600); $retrieval =$memcache->get('test'); if ($retrieval) print_r($retrieval); ?>
Created Jun 3, 2009
View gist:122904
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
 Set fso = CreateObject(Scripting.FileSystemObject) Set f = fso.GetFile("Path\to\file") MsgBox CLng(DateDiff("s", f.DateLastModified, Now))
Created Jun 4, 2009
View gist:123507
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

Created Jun 9, 2009
Bonus points if you work out what this Perl does!
View gist:126220
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
 for($a=1;$a<=11;$a++){if($a==1){print "h";}elsif($a==2){print "e";}elsif($a==3 or $a==4 or$a==10){print "l";}elsif($a==5 or$a==8){print "o";}elsif($a==11){print "d";}elsif($a==7){print "w";}elsif(\$a==9){print "r";}else{print " ";}}
Created Jun 9, 2009
Quality Center OTA via PHP
View gist:126455
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