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/
| # From http://betterspecs.org/: | |
| # For instance methods, use: "#instance_method?" | |
| describe ".class_method" do | |
| # Start context description using "when" or "with". | |
| # Keep it under 40 characters; if longer | |
| # break it up using "context". When run, it should | |
| # output in a readable format. | |
| context "when logged in" do | |
| # Use new rspec syntax. Don't use |
| 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. |
| ;; 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 |
| #!/usr/bin/java -Xmx2G -jar | |
| # Self executing Jar file | |
| [JAR FILE] |
| // sri's solution for http://tour.golang.org/#69 | |
| // Exercise: Equivalent Binary Trees | |
| package main | |
| import ( | |
| "code.google.com/p/go-tour/tree" | |
| "fmt" | |
| ) |
| (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 |
| #! /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() |
| #! /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 = [] |
| 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 |