gem install rails --pre
rails new my_app -T
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
if has('win32') || has ('win64') | |
let $VIMHOME = $HOME."/Dropbox/dotfiles/.vim" | |
if !empty($CONEMUBUILD) | |
set term=xterm | |
set t_Co=256 | |
let &t_AB="\e[48;5;%dm" | |
let &t_AF="\e[38;5;%dm" | |
endif |
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
head 'https://vim.googlecode.com/hg/' | |
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d' | |
version '7.3.682' | |
def features; %w(tiny small normal big huge) end |
remove_project_trailing_whitespace () { | |
for file in * (app|config|test|lib|public)/**/*.(rb|js|sass|css|yml|md|txt|erb|haml|config) | |
do | |
sed -i "" 's/[[:space:]]*$//' ${file} | |
sed -i "" -e :a -e '/^\n*$/N;/\n$/ba' ${file} | |
done | |
} |
on run {input, parameters} | |
-- Setup the list of the main files to be deleted | |
set searchList to {¬ | |
POSIX file ("/Applications/Universal Control.app") as text, ¬ | |
POSIX file ("/Applications/FireStudio Control Console.app") as text, ¬ | |
POSIX file ("/Applications/FireControl.app") as text, ¬ | |
POSIX file ("/Applications/FireStudio Lightpipe Mixer.app") as text, ¬ | |
POSIX file ("/Applications/StudioLive.app") as text, ¬ | |
POSIX file ("/Library/Application Support/PaeFireStudio") as text, ¬ |
autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft() | |
" Close all open buffers on entering a window if the only | |
" buffer that's left is the NERDTree buffer | |
function s:CloseIfOnlyNerdTreeLeft() | |
if exists("t:NERDTreeBufName") | |
if bufwinnr(t:NERDTreeBufName) != -1 | |
if winnr("$") == 1 | |
q | |
endif |
# in rails application.rb | |
initializer "postgresql.no_default_string_limit" do | |
ActiveSupport.on_load(:active_record) do | |
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:string].delete(:limit) | |
end | |
end |
/* | |
Some simple Github-like styles, with syntax highlighting CSS via Pygments. | |
*/ | |
body{ | |
font-family: helvetica, arial, freesans, clean, sans-serif; | |
color: #333; | |
background-color: #fff; | |
border: none; | |
line-height: 1.5; | |
margin: 2em 3em; |
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence | |
" http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
endif |