Skip to content

Instantly share code, notes, and snippets.

# spec/support/db_cleaner.rb
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
woo woo
@JobV
JobV / zshrc
Last active December 23, 2015 02:18
zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="job"
alias cl="clear"
# Git fresh master
alias gfm="git stash; git checkout master; git pull; git stash pop"
@JobV
JobV / job.zsh-theme
Created August 30, 2013 12:31
OhMyZshell theme
#RVM settings
if [[ -s ~/.rvm/scripts/rvm ]] ; then
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
else
if which rbenv &> /dev/null; then
RPS1="%{$fg[yellow]%}rbenv:%{$reset_color%}%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$reset_color%} $EPS1"
fi
fi
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
@JobV
JobV / install.md
Last active December 20, 2015 05:28 — forked from JanDintel/install.md

Guard with Spork for RSpec, Cucumber and Test::Unit

Gems

group :development, :test
  gem 'guard-rspec'
  gem 'guard-livereload'
  gem 'spork-rails', github: 'sporkrb/spork-rails' # rubygems version not rails 4 compatible
  gem 'guard-spork'
 gem 'childprocess'
@JobV
JobV / Git aliases
Last active December 19, 2015 13:49
Handy aliases for git.
git config --global alias.co checkout
git config --global alias.st status
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.pl pull
git config --global alias.ps push
@JobV
JobV / Convert all .erb to .haml
Created May 24, 2013 09:31
Convert all found .erb files to .haml
find . -name '*erb' | \
xargs ruby -e 'ARGV.each { |i| puts "html2haml -r #{i} #{i.sub(/erb$/,"haml")}"}' | \
bash
@JobV
JobV / Sublime Text 2 Rails Settings
Last active December 17, 2015 07:58
Sublime Text User settings
{
"auto_indent": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - itg.flat/itg.dark.tmTheme",
"draw_centered": true,
"ensure_newline_at_eof_on_save": true,
"font_face": "Inconsolata",
"font_size": 15.0,
"highlight_line": true,
"ignored_packages":