Skip to content

Instantly share code, notes, and snippets.

View devth's full-sized avatar
Hacking on @yetibot

Trevor Hartman devth

Hacking on @yetibot
View GitHub Profile
$
function ( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
return new jQuery.fn.init( selector, context, rootjQuery );
}
@devth
devth / super.js
Created March 3, 2011 04:12
How to call "super" in JavaScript
ParentClass.prototype.method.apply(this, arguments);
[merge]
tool = opendiff
[core]
editor = /usr/bin/vim
[alias]
st = status
ci = commit
co = checkout
br = branch
sb = show-branch
" paste above / below
nmap <leader>p o<Esc>p==
nmap <leader>P O<Esc>p==
$(".camera")
.delay(speed / 2)
.css({marginLeft: -halfWindowWidth})
.show()
.animate({marginLeft: 0}, speed);
TypeError in Pages#home
Cannot modify SafeBuffer in place
activesupport (3.0.8) lib/active_support/core_ext/string/output_safety.rb:122:in `gsub!'
haml (3.1.1) lib/haml/compiler.rb:382:in `block in build_attributes'
haml (3.1.1) lib/haml/compiler.rb:358:in `each'
haml (3.1.1) lib/haml/compiler.rb:358:in `collect'
" Surround.vim customization
autocmd FileType javascript let b:surround_112 = "(\"\r\")"
@devth
devth / .vimrc
Created June 14, 2011 22:10
A simple presentation-mode starting point for vim using the solarized light colorscheme: http://ethanschoonover.com/solarized
" Presentation colors and config
function! PresentationMode()
colorscheme solarized
set bg=light
set nolist
endfunction
nmap <leader>PR :call PresentationMode()<cr>
@devth
devth / rake.sh
Created June 17, 2011 21:21
rake
rake 2011-06-17 14:19:56
turn test/*.rb
/Users/trevorhartman/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/test/unit/assertions.rb:5:in `<module:Test>': Unit is not a module (TypeError)
from /Users/trevorhartman/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/test/unit/assertions.rb:4:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /Users/trevorhartman/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/test/unit.rb:4:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /Users/trevorhartman/open_source/hub/test/helper.rb:1:in `<top (required)>'
--type-set=mustache=.mustache
--type-set=jade=.jade
--type-set=txt=.txt
--type-set=js=.js
--type-set=sass=.sass
--type-set=haml=.haml
--type-add=html=.mustache
--type-add=css=.sass