This file contains hidden or 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
let mapleader = ',' | |
set gfn=Monaco:h13 |
This file contains hidden or 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 '[clojure.reflect :as cr]) | |
(cr/reflect java.lang.Math) | |
;{:bases #{java.lang.Object}, :flags #{:public :final}, :me .... | |
; If you want to list all the method names of given class do | |
(map :name (:members (cr/reflect java.lang.Math))) | |
;(round nextUp nextUp exp min cos acos max hypot ceil ulp ulp min floor | |
;cbrt getExponent IEEEremainder log10 min rint tanh copySign | |
;negativeZeroDoubleBits max sin negativeZeroFloatBits E max PI expm1 | |
;cosh toDegrees signum signum sinh pow initRNG max round log |
This file contains hidden or 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
;(= (__ [1 2 3 4 5 6] 2) '((1 3 5) (2 4 6))) | |
;(= (__ (range 9) 3) '((0 3 6) (1 4 7) (2 5 8))) | |
;(= (__ (range 10) 5) '((0 5) (1 6) (2 7) (3 8) (4 9))) | |
(fn [coll n] | |
(sort-by first < | |
(map (fn [y] (filter #(= (mod % n) y) coll)) (range n)))) |
This file contains hidden or 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
(defn min-path [ivec] | |
(letfn [(expand [in] | |
(loop [n 0 acc [[0]]] | |
(if (= n in) | |
acc | |
(recur | |
(inc n) | |
(reduce | |
concat | |
(#(map (fn [n] [(cons 0 n) (cons 0 (map inc n))]) %) acc))))))] |
This file contains hidden or 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
brew update | |
brew versions FORMULA | |
cd `brew --prefix` | |
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
brew install FORMULA | |
brew switch FORMULA VERSION | |
git checkout -- Library/Formula/FORMULA.rb # reset formula | |
## Example: Using Subversion 1.6.17 | |
# |
This file contains hidden or 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
:w !sudo tee % |
This file contains hidden or 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
- Command + b | |
- Grasp a word and search through project | |
- Go to gem directory from source file | |
- Auto save |
This file contains hidden or 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
set tags=~/.tags | |
set nonumber | |
set relativenumber | |
imap jk <esc> | |
imap kj <esc> | |
vmap <leader>F y :Ack <c-r>0<cr> | |
vmap > >gv | |
vmap < <gv |
This file contains hidden or 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
set -g prefix C-a | |
bind-key a send-prefix | |
bind -n C-k send-keys -R \; clear-history | |
This file contains hidden or 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
--type-set=coffee=.coffee | |
--type-set=scss=.scss | |
--ignore-dir=tmp |