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
[live] | |
live ansible_ssh_host=12.34.56.78 ansible_ssh_user=ubuntu |
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
{ | |
groupy: { | |
invited: { | |
eventOne: true, | |
eventTwo: false | |
}, | |
responded: { | |
eventOne: false, | |
eventTwo: false | |
} |
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
require 'ostruct' | |
# use dot notation on nested hash/arrays | |
# based on http://andreapavoni.com/blog/2013/4/create-recursive-openstruct-from-a-ruby-hash/#.U3NjHXWx3AF | |
# but extended to deal with arrays | |
# or you could just use https://github.com/jsuchal/hashugar | |
class DeepStruct < OpenStruct |
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
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.strategy = :truncation | |
end | |
config.before(:each) do | |
DatabaseCleaner.start | |
end | |
config.after(:each) do |
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
# what i'm using for my bash git prompt today | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" |
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
# support/feature_macros.rb | |
module FeaturesMacros | |
def signin_admin | |
DatabaseCleaner.clean | |
@user ||= FactoryGirl.create(:user) | |
visit '/sign_in' | |
within("#new_user") do | |
fill_in 'user[email]', :with => user.email |
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
{ | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 9, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"rulers": | |
[ | |
80 |
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
[alias] | |
where = log --decorate --pretty=short -n1 | |
lol = log --pretty=oneline --graph --decorate --stat | |
lg = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit | |
st = status -sb | |
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
namespace :deploy do | |
desc "Override deploy:cold to include database setup" | |
task :cold do | |
before :run_migrations do | |
capifony_pretty_print "--> Creating database" | |
run "#{release_path}/app/console mygreatdbcommand:database:create-once" | |
capifony_puts_ok | |
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
<VirtualHost *:80> | |
ServerName foo.kevin.dev | |
ServerAlias foo.local.dev | |
ServerAlias foo.local.test | |
DocumentRoot /home/kevin/projects/foo/web/ | |
<Directory /home/kevin/projects/foo/web/> | |
Options Indexes FollowSymLinks MultiViews | |
# pcw AllowOverride None | |
AllowOverride All |