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 pymongo import Connection | |
import urllib | |
import simplejson | |
response = simplejson.load(urllib.urlopen("http://search.twitter.com/search.json?q=test")); | |
tweets = response["results"]; | |
db = Connection().map_reduce_example | |
for tweet in tweets: |
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
theArrayList.toArray(new String[theArrayList.size()]); |
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/lib/ruby/gems/1.8/gems/rb-inotify-0.8.1/lib/rb-inotify/notifier.rb:232:in `read_events': uninitialized constant INotify::Notifier::EINVAL (NameError) | |
from /usr/lib/ruby/gems/1.8/gems/rb-inotify-0.8.1/lib/rb-inotify/notifier.rb:215:in `process' | |
from /usr/lib/ruby/gems/1.8/gems/rb-inotify-0.8.1/lib/rb-inotify/notifier.rb:198:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/fssm-0.1.4/lib/fssm/backends/inotify.rb:20:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/fssm-0.1.4/lib/fssm/monitor.rb:24:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/fssm-0.1.4/lib/fssm.rb:17:in `monitor' | |
from ./bin/../lib/warmonger/filewatcher.rb:23:in `watch' |
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 r = new Regex("(.*)\\?(.*)") | |
req.getUri match { | |
case r(url, params) => // one thing | |
case _ => // other thing | |
} |
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
def f = println("hi") | |
val f2 = f _ // partially applies it | |
f() // hi | |
f2() // hi | |
val f = () => println("hi") | |
val f2 = f _ // wraps it in a function | |
f() // hi | |
f2()() // hi |
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
DICTIONARY = | |
[ | |
"amalar", | |
"noema", | |
"clemiso", | |
"hidromuria", | |
"ambonio", | |
"sustalo", | |
"incopelusa", | |
"novalo", |
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
(require 'package) | |
(require 'cl) | |
(dolist (source '(("elpa" . "http://tromey.com/elpa/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
(add-to-list 'package-archives source t)) | |
;; (add-to-list 'package-archives | |
;; '("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(setq package-user-dir (expand-file-name "elpa" (file-name-directory load-file-name))) |
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
sudo apt-get install libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff4-dev libncurses5-dev |
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 | |
# needed for compiling emacs | |
sudo apt-get install -y libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff4-dev libncurses5-dev qjackctl qsynth | |
# misc | |
sudo apt-get install -y aptitude rlwrap grc | |
# work | |
sudo apt-get install -y mysql-server git git-gui openjdk-7-jdk openjdk-6-jdk curl |
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
# 'ag' command - search for text | |
sudo apt-get install silversearcher-ag |
OlderNewer