Skip to content

Instantly share code, notes, and snippets.

View ajorgensen's full-sized avatar

Andrew Jorgensen ajorgensen

View GitHub Profile
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
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()
### 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:
@ajorgensen
ajorgensen / gist:daba080a250ad7b27cf6
Created June 3, 2014 03:53
Simple example of react and coffeescript
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}" ])
@ajorgensen
ajorgensen / gist:5033c007362690d0ec03
Created May 21, 2014 21:21
Automagically run bundle exec
for fname in 'rspec' 'rails'
do
eval "${fname}() { bundle exec ${fname} }"
eval "${fname}!() { ${fname} }"
done
#!/bin/bash
tmux has-session -t $1 2>/dev/null
if [ "$?" -eq 1 ]; then
tmux new -s $1
else
tmux attach -t $1
fi
@ajorgensen
ajorgensen / gist:9003976
Created February 14, 2014 16:17
Fill in missing title for Github pull request truncated filenames
$(function() {
$(".css-truncate-target").each(function(i, obj) {
$(this).attr('title', $(this).text());
});
});