gpf='git push --force-with-lease'
gca='git commit -v -a'
gpthis='git push origin HEAD:$(git_current_branch) && git branch -u origin/$(git_current_branch) $(git_current_branch) && echo "pushed current branch and set upstream to origin"'
gco='git checkout'
g='grep -i --color=auto'
hb='hub browse'
This file contains 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
# Using these pry gems -- copy to your Gemfile | |
# group :development, :test do | |
# gem 'awesome_print' # pretty print ruby objects | |
# gem 'pry' # Console with powerful introspection capabilities | |
# gem 'pry-byebug' # Integrates pry with byebug | |
# gem 'pry-doc' # Provide MRI Core documentation | |
# gem 'pry-rails' # Causes rails console to open pry. `DISABLE_PRY_RAILS=1 rails c` can still open with IRB | |
# gem 'pry-rescue' # Start a pry session whenever something goes wrong. | |
# gem 'pry-theme' # An easy way to customize Pry colors via theme files | |
# end |
This file contains 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
# Using these pry gems -- copy to your Gemfile | |
# group :development, :test do | |
# gem 'awesome_print' # pretty print ruby objects | |
# gem 'pry' # Console with powerful introspection capabilities | |
# # pick either: | |
# # using byebug, but has issues with Zeitwerk | |
# gem 'pry-byebug' # Integrates pry with byebug | |
# | |
# # using default ruby debuggger | |
# gem 'pry-stack_explorer' |
This file contains 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
org_posts_dir = "org_posts" # directory under source | |
# From http://www.ewal.net/2012/09/08/octopress-customizations/ | |
# Modified to have default flag of true to include drafts | |
desc "Rename files in the posts directory if the filename does not match the post date in the YAML front matter" | |
task :rename_posts do | |
rename_posts_in_dir "#{source_dir}/#{posts_dir}", "markdown" | |
# remove next line if you're you're not using org-mode | |
rename_posts_in_dir "#{source_dir}/#{org_posts_dir}", "org" |
This file contains 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
#!/usr/bin/env bash | |
# Edit the list of commands. | |
# YOU MUST USE SINGLE QUOTES HERE. | |
commands=( | |
'yarn run build:client-bundles:prod' | |
'yarn run build:server-bundle:prod' | |
'yarn run build:global-styles:prod' | |
) |
This file contains 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
# Using these pry gems -- copy to your Gemfile | |
# group :development, :test do | |
# gem 'awesome_print' # pretty print ruby objects | |
# gem 'pry' # Console with powerful introspection capabilities | |
# # pick either: | |
# # using byebug, but has issues with Zeitwerk | |
# gem 'pry-byebug' # Integrates pry with byebug | |
# | |
# # using default ruby debuggger | |
# gem 'pry-stack_explorer' |
This file contains 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
set-option -g default-shell /bin/zsh | |
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard | |
# http://brentvatne.github.com/tmux-copy-paste/ | |
# this next command takes the current buffer and puts it on the OS clipboard | |
#bind Y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
# | |
# I don't understand why the next would be useful | |
# bind P run "tmux paste-buffer" | |
bind y copy-mode |
This file contains 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
# Method to check the DB version matches | |
# We ran into an issue where different versions of postgres caused inconsistent results. | |
def check_db_version | |
expected_db_version = "PostgreSQL 9.4" | |
adapter = ActiveRecord::Base.connection.adapter_name | |
sql = case adapter | |
when "MSSQL" | |
"SELECT @@VERSION" | |
when "MySQL", "Mysql2", "PostgreSQL" | |
"SELECT VERSION()" |
This file contains 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 File.expand_path("../../config/environment", __FILE__) | |
require "rspec/rails" | |
require "rspec/mocks" | |
require "capybara/rspec" | |
require "vcr" | |
require "rails/application" | |
require "webmock/rspec" | |
require "shoulda/matchers" | |
require "capybara-screenshot/rspec" |
This file contains 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
# depends on justin808 gist named utility.zsh | |
# https://gist.github.com/justin808/bdef67f37c2cbdba898a | |
# See forum discussion: http://forum.railsonmaui.com/t/zsh-with-git-flow/135 | |
#### GIT #### | |
# http://superuser.com/questions/458906/zsh-tab-completion-of-git-commands-is-very-slow-how-can-i-turn-it-off | |
# fix slow completion on files | |
# __git_files () { | |
# _wanted files expl 'local files' _files |
NewerOlder