Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" source ~/.vimrc.before if it exists. | |
if filereadable(expand("~/.vimrc.before")) | |
source ~/.vimrc.before | |
endif | |
" ================ General Config ==================== |
require "shopify_api" | |
# | |
# Retry a ShopifyAPI request if an HTTP 429 (too many requests) is returned. | |
# | |
# ShopifyAPIRetry.retry { customer.update_attribute(:tags, "foo") } | |
# ShopifyAPIRetry.retry(30) { customer.update_attribute(:tags, "foo") } | |
# c = ShopifyAPIRetry.retry { ShopifyAPI::Customer.find(id) } | |
# | |
# By Skye Shaw (https://gist.github.com/sshaw/6043fa838e1cecf9d902) |
class ApplicationController < ActionControllerBase | |
helper :do_something | |
def do_something | |
@from_do_something = params[:for_do_something] | |
end | |
end |
# Keep code struture in models consistent | |
# Inspired by http://rails-bestpractices.com/posts/75-keep-code-struture-in-models-consistent | |
# One example: (From top to bottom) | |
associations | |
scopes | |
class methods | |
validates | |
callbacks | |
instance methods |