r<enter>
c{motion}
should yank into the register- pasting over a visual mode selection should replace it and yank the replaced text into the register
~
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
for v in system `rbenv versions --bare`; do RBENV_VERSION=$v ruby -v; done |
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
$ RBENV_VERSION=1.9.3-p194 ruby -e 'p Object.class_variables; Class.new { def set() @@v = 11 end }.new.set; p Object.class_variables' | |
[] | |
-e:1: warning: class variable access from toplevel | |
[:@@v] | |
# Turns out it's was an intentional (?!?!?!) change: http://bugs.ruby-lang.org/issues/5544 |
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
(ns reunions.core) | |
(defn- next-year | |
[years reunion-counts] | |
(let [this-year (inc (last (keys reunion-counts))) | |
reunion-counts (assoc reunion-counts this-year 0) | |
add-reunion (fn [counts year] | |
(let [abs-year (- this-year year)] | |
(if (contains? counts abs-year) | |
(update-in counts [abs-year] inc) |
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
dscl . append /Groups/com.apple.access_ssh user $DUMMY_ACCOUNT | |
dscl . append /Groups/com.apple.access_ssh groupmembers `dscl . read /Users/$DUMMY_ACCOUNT GeneratedUID | cut -d " " -f 2` |
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 i_can_haz_namespaced_function? | |
false | |
end | |
"Completely unrelated object".send :i_can_haz_namespaced_function? | |
#=> false |
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
# http://linux.die.net/man/1/gvim | |
/^[gm]?vi/ | |
"-f" | |
"--nofork" | |
# http://www.gnu.org/software/emacs/manual/html_node/emacs/emacsclient-Options.html | |
"emacsclient" | |
!"-n" | |
!"--no-wait" |
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
import re, string | |
from functools import partial | |
from clojure_types import Keyword, Symbol, UnknownObject, Vector | |
debug = False | |
re_symbol = re.compile(r"[-\w*+!?/<>&.]+") | |
re_keyword = re.compile(r":([-\w*+!?/<>&]+)") | |
re_number = re.compile(r"\-?\d+(\.\d+)?") | |
re_string = re.compile(r"\"(([^\\\"]|\\.)*)\"") |
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
(ns tache-middlewares.core | |
(:use [net.cgrand.moustache] | |
[ring.handler.dump] | |
[ring.middleware.session])) | |
(def handler (app | |
["supa" &] (app | |
wrap-session | |
["set"] (fn [req] {:status 200, :body "set", :session {:thing 1}}) | |
["dump"] handle-dump))) |
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
window.Matt = {} | |
Matt.Printer = do -> | |
message1 = "Yo ho ho" | |
message2 = "Five dwarves" | |
print1 = -> | |
console.log message1 | |
print2 = -> | |
console.log message2 |