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
<?php | |
/* | |
Make sure to localize the new storyboard files using Xcode and that should be used as the destination. | |
*/ | |
$src = file($argv[1]); | |
$dst = file($argv[2]); | |
$modified_file = array(); |
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 <iostream> | |
#include <fstream> | |
#include <sstream> | |
using namespace std; | |
#define SPLIT_SIZE 1024 * 1024 * 1024 | |
int main (int argc, char *argv[]) { | |
if (argc<2) { |
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
#!/bin/bash | |
mac=68:a8 | |
mac0=`openssl rand -hex 1` | |
mac1=`openssl rand -hex 1` | |
mac2=`openssl rand -hex 1` | |
mac3=`openssl rand -hex 1` | |
final=$mac:$mac0:$mac1:$mac2:$mac3 | |
ifconfig en1 ether $final |
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
// ==UserScript== | |
// @name Facebook link cleaner | |
// @description Remove facebook link mousedown events that sends you to news site's facebook app instead actual content. Based on "http://userscripts.org/scripts/review/125355" | |
// @include http://www.facebook.com/* | |
// @include https://www.facebook.com/* | |
// @version 1.0 | |
// ==/UserScript== | |
function stripit(links) { | |
for (var i=0; i<links.length; i++) { |
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
page="`curl 'http://search.twitter.com/search.atom?q=sajje+since%3A2011-04-13&rpp=100'`" | |
next="test" | |
all="" | |
while [ "$next" != "" ]; do | |
all="$all | |
`echo "$page" | grep '<name>' | sed 's/<name>\(.*\)<\/name>/\1/' | awk '{print $1}'`" | |
next=`echo "$page" | grep -o -e '<link type=\"application\/atom+xml\" href\=\"[^\"]*\" rel=\"next\"/>' | sed 's/.*href="\([^"]*\)".*/\1/' | sed 's/\&/\&/g'` | |
if [ "$next" != "" ]; then | |
page=`curl $next` | |
fi |
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
<?php | |
class Notifo_API { | |
const API_ROOT = 'https://api.notifo.com/'; | |
const API_VER = 'v1'; | |
protected $apiUsername; | |
protected $apiSecret; |
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
from urlparse import urlparse | |
import csv | |
f = csv.reader(open('fixed.csv')) | |
domains = {} | |
counts = {} | |
used = {} | |
for row in f: | |
if (row[9] not in used): |
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
import csv | |
f = open('trends.csv') | |
writer = csv.writer(open("fixed.csv", "wb")) | |
def valid(x): return (x!="," and x!="" and x!="\r\n"); | |
def remove_new(x): return x.replace("\r\n","") | |
lines = "" | |
for line in f: |