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
| #!/usr/bin/env sh | |
| function gitlab { | |
| if [ -z "$1" ] | |
| then | |
| echo "compare\nrepo\n" | |
| else | |
| case "$1" in | |
| compare) | |
| gitlab-compare "${@:2}" |
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
| git diff --name-status master..feature/distributed_redis | grep -E "^M" |
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 run_if_present( path ) | |
| puts "if [ -d #{path} ]; then #{yield self}; fi" | |
| end | |
| my_pid_file = "/somewhere/secret" | |
| run_if_present my_pid_file do | |
| "ls #{my_pid_file}" | |
| 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
| set :keep_releases, 3 | |
| set :stages, %w(production staging) | |
| require 'rainbow' | |
| require 'capistrano/ext/multistage' | |
| require 'capistrano/tampon' | |
| require 'bundler/capistrano' | |
| require 'thinking_sphinx/deploy/capistrano' | |
| set :user, 'deploy' |
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
| # addressable.rb | |
| module Schemata | |
| module Schema | |
| def addressable | |
| apply_schema :street_address_1, String | |
| apply_schema :street_address_2, String | |
| apply_schema :city, String | |
| apply_schema :state, String | |
| apply_schema :zip_code, String | |
| apply_schema :country, String |
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
| module ActiveSupport | |
| class BufferedLogger | |
| module Severity | |
| COLORIZE = 10 | |
| end | |
| include Severity | |
| def add(severity, message = nil, progname = nil, &block) | |
| return if @level > severity | |
| message = (message || (block && block.call) || progname).to_s | |
| message = "\e[0;45m#{message}\e[0;0m\n" if severity == 10 |
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
| #seed.rb | |
| plant :admin_users | |
| #block syntax | |
| plant :about_us do |seed| | |
| seed.path = "db/seeds/some_folder" | |
| end | |
NewerOlder