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
def print_link(text, url) | |
link_to(text, url, class: 'no-print') << | |
content_tag('span', class: 'print-only') { text } | |
end |
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
color solarized | |
set guifont=Monaco:h18.00 | |
set cc=80 | |
set wildmode=list:longest | |
set vb | |
set guioptions=egmrt | |
set clipboard=unnamed | |
au BufNewFile,BufRead *.ejs set filetype=html | |
if filereadable(expand("~/.gvimrc.local")) |
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
color desert | |
set guifont=Monaco:h18.00 | |
set vb | |
au BufNewFile,BufRead *.ejs set filetype=html | |
" Maintaining the visual line selection after indenting with '>' or '<' | |
vmap > >gv | |
vmap < <gv | |
" search things |
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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
has_mobile_fu false | |
protected | |
def mobile_only_mobile_fu | |
set_mobile_format if is_mobile_device? | |
end | |
end |
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
class ArticlesController < ApplicationController | |
use Rack::ShowExceptions, only: :show | |
# ... | |
end |
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
rails g devise:views |
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
gem 'jasmine-headless-webkit', git: "git://github.com/johnbintz/jasmine-headless-webkit.git" |
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
rake spec:jasmine | |
rake spec:jasmine:ci |
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
module MyModule | |
extend ActiveSupport::Concern | |
included do | |
#class method defined in ActiveSupport::Validations::ClassMethods (i.e. using ActiveSupport::Concern | |
validate :my_validation | |
#Rails method defined in ActiveSupport::CoreExt ... | |
cattr_accessor :yo |