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
emacs () { | |
PROCESS=Emacs | |
number=$(ps aux | grep $PROCESS | wc -l) | |
if [ $number -gt 1 ] | |
then | |
emacsclient -c -n $1 | |
else | |
open -a /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.8/Emacs.app $1 | |
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
fs = require 'fs' | |
webpage = require 'webpage' | |
page = webpage.create() | |
renderedUrls = 0 | |
totalUrls = 0 | |
# Taken from https://github.com/ariya/phantomjs/blob/master/examples/waitfor.js | |
# Converted into coffee | |
waitFor = (testFx, onReady, timeOutMillis) -> | |
maxtimeOutMillis = (if timeOutMillis then timeOutMillis else 5000) #< Default Max Timout is 3s |
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
parse_tweet = function (str) { | |
var create_link = function (url, text) { | |
var link = $("<a>", { | |
text: text, | |
href: url, | |
target: "_blank" | |
}); | |
return link.prop('outerHTML'); | |
}; |
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 pybing import Bing | |
from urllib2 import HTTPError | |
from BeautifulSoup import BeautifulSoup | |
from pybing import constants | |
import re | |
import mechanize | |
import simplejson | |
searchstring = "cows" # your search string here | |
searchcount = 40 |
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
#!/usr/bin/env python | |
import sys | |
from twython import Twython | |
import random | |
CONSUMER_KEY = 'xxxx' | |
CONSUMER_SECRET = 'xxxx' | |
ACCESS_KEY = 'xxxx' | |
ACCESS_SECRET = 'xxxx' |
NewerOlder