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
#chmod a+x {this_file} to make executable and add it to $PATH | |
query=$(echo $1 | sed 's/ /\+/g') | |
curl -A "Mozilla/2.01" "http://www.google.com/search?source=ig&hl=en&rlz=&q=$query&btnG=Google+Search" 2>/dev/null| | |
tr '>' '\n' 2>/dev/null| | |
grep "<h3 class=\"r\"" -A 1| | |
grep "href="| | |
sed 's/.*href="//'| | |
sed 's/".*//'| | |
head -n 1 | |
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
javascript:var a = document.getElementsByClassName('js-slide-to'); for (var i=0; i<a.length; i++){a[i].setAttribute('style','color:blue');};var a = document.getElementsByClassName('relatize'); for (var i=0; i<a.length; i++){a[i].setAttribute('style','color:blue');};var a = document.getElementsByClassName('message'); for (var i=0; i<a.length; i++){a[i].setAttribute('style','color:blue');};var a = document.getElementsByTagName('td'); for(var i=0;i<a.length;i++){ a[i].setAttribute('style','background:black')}; |
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
APT { | |
Get { | |
Assume-Yes "true"; | |
Fix-Broken "true"; | |
}; | |
}; |
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
# Mirrored at https://gist.github.com/973069 | |
# If you update this file, remember to update the gist because most Gambino setup functions `wget` the gist before | |
# anything else (before it even installs git) | |
# When SSH into Github, do not prompt the user if they want to add the host keys to the ~/.ssh/known_hosts file | |
StrictHostKeyChecking no | |
# Implicity trust keys so don't if the authenticity of a host like github.com can't be established | |
VerifyHostKeyDNS yes |
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
us -> | |
p = prime() | |
g = primitiveRoot p | |
send p, g | |
, | |
them (data) -> | |
p = data.p | |
g = data.g | |
, | |
both -> |
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
#Usage: py thisfile.py {JSON-string} | |
#Try py thisfile.py "["foo", {"bar":["baz", null, 1.0, 2]}]" | |
import json | |
import sys | |
if __name__ == "__main__": | |
obj = json.loads(sys.argv[1]) | |
print json.dumps(obj, sort_keys=True, indent=4) |
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
deb http://archive.cloudera.com/debian maverick-cdh3 contrib | |
deb-src http://archive.cloudera.com/debian maverick-cdh3 contrib |
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
#JAVA | |
#Thanks to http://www.davidpashley.com/blog/debian/java-license | |
sun-java5-jdk shared/accepted-sun-dlj-v1-1 select true | |
sun-java5-jre shared/accepted-sun-dlj-v1-1 select true | |
sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true | |
sun-java6-jre shared/accepted-sun-dlj-v1-1 select true | |
#MySQL | |
#Thanks to http://www.muhuk.com/2010/05/how-to-install-mysql-with-fabric/ | |
mysql-server mysql-server/root_password password '' |
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
// Notify the user (or not?) when there's no console | |
d = function() { | |
// TODO: Update the JS from CS | |
var args; | |
args = 1 <= arguments.length ? [].slice.call(arguments, 0) : []; | |
return console.log.apply(console, args); | |
}; | |
d = (args...) -> |
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 (window) { | |
/* Throttle fn modified from underscore.js */ | |
var _throttle = function (func, wait) { | |
var context | |
var args | |
var result | |
var timeout = null | |
var previous = 0 |