http://weblog.jamisbuck.org/2008/10/10/coming-home-httpsto-vim
http://weblog.jamisbuck.org/2008/11/17/vim-follow-up
http://yehudakatz.com/2010/07/29/everyone-who-tried-to-convince-me-to-use-vim-was-wrong/
http://www.10gen.com/video/mongosv2010/intro | |
mongo - shell | |
mongod, mongos - db w/ sharding | |
db has collection of documents | |
bson for fast scanability - think 2mb json string | |
bson can store binary data (no need to do base64) |
require 'open-uri' | |
event = ARGV[0] || "rubyconf2010" | |
open("http://confreaks.net/events/#{event}"). | |
read. | |
scan(/<div class='main-info'>.*?<div class='clear'><\/div>/im). | |
map { |x| | |
url, title = x.scan(/<div class='title'>.*?<a href="([^"]*)">([^<]*)<\/a>/im).flatten | |
presenters = x.scan(/<div class='presenters'>.*?<\/div>/im)[0].gsub(/<[^>]*>/, ''). | |
gsub(/\n/, '') | |
views = x.scan(/Views:.*?([\d,]+)/im).flatten[0].gsub(/,/, '').to_i |
#! /usr/bin/env node | |
var path = require('path'), | |
fs = require('fs') | |
var userhome = process.env['HOME'], | |
downloadsDir = path.join(userhome, 'Downloads'), | |
downloads = fs.readdirSync(downloadsDir), | |
all = [] |
#! /usr/bin/env coffee | |
Http = require 'http' | |
Number::toRad = -> this * (Math.PI / 180) | |
# http://www.movable-type.co.uk/scripts/latlong.html | |
haversine = (p, q) -> | |
R = 6371 | |
latDist = (q.lat - p.lat).toRad() |
(ns user (:use clojure.pprint)) | |
(def all-known-operators {}) | |
(defn op-known? [op] | |
(contains? all-known-operators op)) | |
(defn op-eval [op stack size] | |
(let [fn (get all-known-operators op)] | |
(when fn |
// sri's solution for http://tour.golang.org/#69 | |
// Exercise: Equivalent Binary Trees | |
package main | |
import ( | |
"code.google.com/p/go-tour/tree" | |
"fmt" | |
) |
#!/usr/bin/java -Xmx2G -jar | |
# Self executing Jar file | |
[JAR FILE] |
;; Whitespace | |
(setq whitespace-style | |
(remove 'newline | |
(remove 'newline-mark whitespace-style))) | |
;; Selective Display: | |
;; http://www.gnu.org/software/emacs/manual/html_node/emacs/Selective-Display.html#Selective-Display |
Emacs Buffer Search | |
================================================== | |
Incremental Search Forward - (default C-s; C-f for me) | |
Incremental Search Backward - (default C-r; C-f C-r for me) | |
Regexp Incremental Search Forward (default C-M-s) | |
Regexp Incremental Search Backward (default C-M-s) | |
Occur (default M-s o): | |
Search lines in a buffer matching a pattern and output in another buffer. |