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
if [ -f ~/.bash_profile ]; then | |
source ~/.bash_profile | |
fi | |
if [ -f ~/.zshrc ]; then | |
source ~/.zshrc | |
fi | |
hash oclint &> /dev/null | |
if [ $? -eq 1 ]; then | |
echo >&2 "oclint not found, analyzing stopped" |
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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
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
# based on https://gist.github.com/3349345 | |
# Thanks, @alloy! | |
# | |
# To get your project ready for this, you'll have to create a scheme for your unit test project, make sure run is checked in | |
# the build step, and then delete the Test Host setting. | |
# Also, make sure you have the colored and open4 gems installed. | |
require 'rubygems' | |
require 'colored' | |
require 'pathname' |
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
# #{Rails.root}/lib/tasks/databases.rake | |
=begin | |
Monkey Patch | |
activerecord-3.0.9/lib/active_record/railties/databases.rake | |
clears obstinate stale PG session to get parallel_tests working | |
also, PG user must be superuser to use these low level PG functions | |
=end | |
def drop_database(config) | |
case config['adapter'] | |
when /mysql/ |
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
#!/bin/sh | |
# Extended iOS Build Script | |
# Written by Aron Bury, 29/11/2011 | |
#==== Script Params ===== | |
# App params | |
appname="AwesomeApp" | |
target_name="$appname" | |
sdk="iphoneos" |
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
# switch default editor for pry to sublime text | |
Pry.config.editor = "sublime" | |
# format prompt to be <Rails version>@<ruby version>(<object>)> | |
Pry.config.prompt = proc do |obj, level, _| | |
prompt = "\e[1;30m" | |
prompt << "#{Rails.version} @ " if defined?(Rails) | |
prompt << "#{RUBY_VERSION}" | |
"#{prompt} (#{obj})>\e[0m" | |
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
file 'config/preinitializer.rb', <<-PRE | |
# Use bundled gems | |
begin | |
require File.expand_path('../../.bundle/environment', __FILE__) | |
rescue LoadError | |
# This setup deliberately requires that the application be locked. | |
# For an alternative, see http://gist.github.com/302406#file_preinitializer.rb | |
if File.exist?(File.expand_path('../../Gemfile.lock', __FILE__)) | |
raise "Application is locked but not installed. Run `bundle install` and then try again." | |
else |