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
brew install cpanm | |
sudo cpanm Thread::Pool |
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
brew update | |
brew install https://raw.github.com/mxcl/homebrew/0bb5530efa1b9e5e1015915a1f9111fa33206516/Library/Formula/cassandra.rb | |
brew install python | |
pip install cql | |
cd /usr/local/Cellar/cassandra/1.2.9/bin | |
./cqlsh |
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
var obj = something; | |
var res = JSON.stringify(obj, function(key, val) { | |
if (typeof val == "object") { | |
if (seen.indexOf(val) >= 0) | |
return; | |
seen.push(val) | |
} | |
return val; | |
}) |
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
try { | |
for (var i in window){ | |
if (window.hasOwnProperty(i)) { | |
console.log(i + unescape("%0A")); | |
} | |
} | |
} catch(e) { | |
console.log(e.message); | |
} |