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 | |
VAR=5 | |
./other $VAR |
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
// this is the constructor function of the javascript object (i.e. the `initialize` method) | |
var User = function(data, http) { | |
// copy data (presumably a simple JSON object received by a call to some API) | |
angular.copy(data, this); | |
this.http = http; | |
} | |
// add methods to the User "class" | |
User.prototype.fullName = function() { | |
return this.firstName + ' ' + this.lastName; |
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
class Numeric | |
# works for Float, Integer and BigDecimal | |
def whole? | |
self % 0 == 1 | |
end | |
end |
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! OpenMostRecenMigration() | |
exec 'vsp' system('echo db/migrate/`ls db/migrate | tail -n 1 | cut -f 1`') | |
endfunction | |
nnoremap <Leader>m :call OpenMostRecenMigration()<CR> |
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
command Migrate !zeus rake db:migrate db:rollback && zeus rake db:migrate db:test:prepare | |
command Rollback !zeus rake db:rollback | |
command Reset !zeus rake db:reset |
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
# FancyCheckbox: A customizable checkbox tool. | |
# | |
# Hides a given checkbox and replaces it with a div, binding the appropriate | |
# event handlers to manipulate the real, underlying checkbox. | |
# Also copies any existing label into the replacement markup. | |
# | |
# DOM tree looks like this: | |
# <input name="john-doe" type="checkbox" style="display: none;"> | |
# <div class="fancy-checkbox-container"> | |
# <div class="fancy-checkbox-label-wrapper"> |
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
{ | |
"command": "ruby -rubygems -r./custom_plan -eZeus.go", | |
"plan": { | |
"boot": { | |
"default_bundle": { | |
"development_environment": { | |
"prerake": {"rake": []}, | |
"console": ["c"], | |
"generate": ["g"], |
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
" 80 characters color column | |
if exists('+colorcolumn') | |
set colorcolumn=80 | |
else | |
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1) | |
endif |
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
" highlight trailing whitespace | |
highlight WhitespaceEOL ctermbg=Red guibg=Red | |
match WhitespaceEOL /\s\+$/ | |
" remove whitespace before save | |
autocmd BufWritePre {*.rb,*.js,*.coffee,*.scss,*.haml} :%s/\s\+$//e |
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
require 'zeus/rails' | |
require 'dotenv' | |
class CustomPlan < Zeus::Rails | |
def boot | |
Dotenv.load | |
super | |
end | |
end |
NewerOlder