Skip to content

Instantly share code, notes, and snippets.

View fmnoise's full-sized avatar
🇺🇦

fmnoise

🇺🇦
View GitHub Profile
@terjesb
terjesb / gist:4257641
Created December 11, 2012 10:38
iTerm2 emacs 24.2.1 -nw with paredit on OS X 10.8 Norwegian layout
iTerm2 emacs 24.2.1 -nw with paredit on OS X 10.8 Norwegian layout
Left Command is my Meta.
Left Alt used for inputting special characters.
Caps Lock is mapped to Control.
 > System Preferences > Keyboard > Keyboard > Special: Caps Lock: ^ Control
iTerm > Preferences > Keys: Left Command key mapped to Right Option
iTerm > Preferences > Profiles > Keys: Right option acts as: +Esc
@snowman-repos
snowman-repos / Word wrap
Last active July 12, 2017 21:34
SASS: Word Wrap
// Word Wrapping
@mixin word-wrap() {
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
.word-wrap {
@jboner
jboner / latency.txt
Last active April 23, 2025 18:02
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@ato
ato / debug.clj
Created December 9, 2009 11:42
Simpler debug-repl that works with unmodified Clojure
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html
(defmacro local-bindings
"Produces a map of the names of local bindings to their values."
[]
(let [symbols (map key @clojure.lang.Compiler/LOCAL_ENV)]
(zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols)))
(declare *locals*)
(defn eval-with-locals