git config --list // Checks your current git configuration settings
git config --global core.editor "sub --wait" // Sets sublime text to be the default editor for commit messages
git config --global user.name "John Doe" // Sets up the default name for Git Commits
git config --global user.email "[email protected]" // Sets up the default email for Git Commits
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
| ZSH=$HOME/.oh-my-zsh | |
| ZSH_THEME="muse" | |
| DISABLE_AUTO_UPDATE="true" | |
| DISABLE_LS_COLORS="false`" | |
| plugins=(git sublime bundler brew gem rails3) | |
| export EDITOR="sub --wait" | |
| source $ZSH/oh-my-zsh.sh |
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
| ENV["RAILS_ENV"] = "test" | |
| require "coveralls" | |
| Coveralls.wear! | |
| require File.expand_path("../../config/environment", __FILE__) | |
| require "rails/test_help" | |
| require "minitest/rails" | |
| require "email_spec" | |
| # To add Capybara feature tests add `gem "minitest-rails-capybara"` | |
| # to the test group in the Gemfile and uncomment the following: |
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
| group :development do | |
| gem "pry" | |
| gem "powder" | |
| gem "letter_opener" | |
| gem "better_errors", ">= 0.7.2" | |
| gem "binding_of_caller", ">= 0.7.1" | |
| gem 'meta_request' | |
| gem "html2haml", ">= 1.0.1" | |
| gem 'guard' | |
| gem 'rb-fsevent', require: 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
| # Letter opener config: | |
| # https://github.com/ryanb/letter_opener | |
| ... | |
| # Change mail delvery to either :smtp, :sendmail, :file, :test | |
| config.action_mailer.delivery_method = :letter_opener | |
| .... |
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 create_url | |
| country = Country.where(:name => params[:country]).first | |
| @wine = Wine.create( | |
| :name => params[:name], | |
| :country => BSON::ObjectId.from_string(country.id.to_s), | |
| :region => params[:region], | |
| :varietal => params[:varietal], | |
| :producer => params[:producer], | |
| :wine_type => params[:wine_type], | |
| :year => params[:year], |
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 "reload the database with seed data" | |
| task :seed do | |
| run "cd #{current_path}; bundle exec rake db:seed RAILS_ENV=#{rails_env}" | |
| 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
| ## Create User | |
| User.create! :first_name => "Test", :last_name => "User", :email => "[email protected]", :password => "password123"# add whatever other parameters you have here | |
| # if you wanted to make user an admin (which I'm assuming you do if it's in a seed file) do: | |
| u = User.create! :first_name => "Test", :last_name => "User", :email => "[email protected]", :password => "password123" | |
| u.spree_roles << Spree::Role.find_or_create_by_name("admin") |
This Presentation was built to be viewed with GistDeck
DRUG September 5, 2012
This Presentation was built to be viewed with GistDeck

