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 AppSettings | |
| class Railtie < Rails::Railtie | |
| config.settings = ::ActiveSupport::OrderedOptions.new | |
| 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
| module TestMethodAlternatives | |
| def testing(description, &block) | |
| formatted_desc = description.gsub(/\s+/, '_').gsub(/\W+/, '') | |
| define_method("test_#{formatted_desc}") do | |
| if block_given? | |
| instance_eval(&block) | |
| else | |
| instance_eval do | |
| skip("test_#{formatted_desc}") |
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
| #!/bin/bash | |
| # | |
| # by: Robert Evans | |
| # | |
| # Git Merge Since Search | |
| # | |
| # I needed to be able to search git history looking for all merge commits from | |
| # a specific repo, into another specific repo, starting at a given point in time. | |
| # | |
| # Example: |
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
| root(appname) do | |
| mkdir "config" | |
| mkdir "log" | |
| mkdir "test" | |
| touch "Readme.mkd" | |
| template "config.ru", file_or_string | |
| template "config/application.rb", file_or_string | |
| cp "test/test_helper.rb", file_or_string | |
| template "bin/script", file_or_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
| #!/usr/bin/env bash | |
| # | |
| # Author: Robert R Evans | |
| # | |
| # Description: AWS Ubuntu 13 Ruby Setup Script | |
| # | |
| # This script will setup a ubuntu box for Ruby, Rails, Sinatra, and/or Rack | |
| # development/staging/production usage. It also installs Nodejs, Nginx, Git, | |
| # Rbenv, and PostgreSQL adapters for using RDMS PostgreSQL. It assumes that | |
| # git-deploy will be used, in place of the traditional capistrano deployments. |
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 ObjectDiagnostics | |
| extend self | |
| #This is handy when you want to determine what types of objects are contributing to memory bloat | |
| #returns the change in object counts since the last time this method was called | |
| def change_in_object_counts | |
| #this will start all counts at 0 for the initial run | |
| @previous_counts ||= Hash.new(0) |
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 'net/https' | |
| require 'json' | |
| require 'uri' | |
| module MightyOctocat | |
| class Releases | |
| attr_reader :owner, :repo | |
| # ==== Arguments | |
| # |
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
| #!/bin/bash | |
| set -e | |
| arg=$1 | |
| function specific_pull_request() { | |
| echo "Fetching Pull Request '${arg}' from Github..." | |
| git fetch origin pull/$arg/head:pr-$arg | |
| } |
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
| # /etc/init/project-web-reload.conf | |
| pre-start script | |
| initctl restart project-web | |
| sleep 15 | |
| end script | |
| exec /usr/local/rvm/bin/default_bluepill restart |