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
$(function() { | |
$(".css-truncate-target").each(function(i, obj) { | |
$(this).attr('title', $(this).text()); | |
}); | |
}); |
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
#!/bin/bash | |
tmux has-session -t $1 2>/dev/null | |
if [ "$?" -eq 1 ]; then | |
tmux new -s $1 | |
else | |
tmux attach -t $1 | |
fi |
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 fname in 'rspec' 'rails' | |
do | |
eval "${fname}() { bundle exec ${fname} }" | |
eval "${fname}!() { ${fname} }" | |
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
data = [ | |
{ first: 'Bruce', last: 'Wayne' }, | |
{ first: 'Peter', last: 'Parker' }, | |
{ first: 'Foo', last: 'Bar' }] | |
person = React.createClass | |
render: -> | |
( | |
(React.DOM.div {}, [ | |
(React.DOM.h2 {}, [ "#{@props.last}, #{@props.first}" ]) |
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
### Keybase proof | |
I hereby claim: | |
* I am ajorgensen on github. | |
* I am ajorgensen (https://keybase.io/ajorgensen) on keybase. | |
* I have a public key whose fingerprint is D155 725D F971 E4D4 3CA0 3C9D B104 24F3 7FA5 6977 | |
To claim this, I am signing this object: |
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
call pathogen#runtime_append_all_bundles() | |
set runtimepath^=~/.vim/bundle/ctrlp.vim | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" VUNDLE CONFIGURATION | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() |
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
set splitright | |
map <leader>a :call OpenTestFile()<cr> | |
function! OpenTestFile() | |
let test_file = system("echo " . expand("%:t") . " | sed 's/\.rb/_test.rb/' | xargs find ./test -name | head -1") | |
exec ':vsp ' . test_file | |
endfunction |
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
if has("autocmd") | |
autocmd BufWritePre {*.rb,*.js,*.coffee,*.scss,*.haml,*.py,*.js} :call <SID>StripTrailingWhitespaces() | |
endif | |
nnoremap <silent> <F5> :call <SID>StripTrailingWhitespaces()<CR> | |
function! <SID>StripTrailingWhitespaces() | |
" Preparation: save last search, and cursor position. | |
let _s=@/ | |
let l = line(".") |
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
(defmapfn to-json [json_keys & args] | |
"Takes keys and values and emit json strings based on those key value pairs. The size of json_keys should be the same | |
size as args. Usage: (to-json ['foo' 'bar'] ?v1 ?v2 :> ?json)" | |
(json/generate-string (zipmap json_keys args))) | |
=> fieldDeclaration must be the same size as the given values |
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
(defmacro defdeprecated [old new] | |
`(defmacro ~old | |
[sym# & body#] | |
(println ~(format "Warning, %s is deprecated; use %s." | |
old | |
(resolve new))) | |
`(~'~new ~sym# ~@body#))) |
OlderNewer