Skip to content

Instantly share code, notes, and snippets.

@oisinkim
oisinkim / Install cpanm & the Thread::Pool module
Last active August 29, 2015 13:57
Install cpanm & the Thread::Pool module
brew install cpanm
sudo cpanm Thread::Pool
@oisinkim
oisinkim / install cassandra 1.2.9 and cql
Created September 10, 2013 23:15
Install Cassandra 1.2.9 and cql on OS X using brew and pip
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
@oisinkim
oisinkim / gist:6448824
Created September 5, 2013 11:13
What to do when JSON.stringify returns cyclic object value
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;
})
@oisinkim
oisinkim / console_log_window_properties.js
Created August 27, 2013 10:48
Output window properties to the console (inspecting a browser window object in JS)
try {
for (var i in window){
if (window.hasOwnProperty(i)) {
console.log(i + unescape("%0A"));
}
}
} catch(e) {
console.log(e.message);
}