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 |
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/bash | |
if [ $# -lt 4 ] | |
then | |
branch='gh-pages' | |
else | |
branch=$4 | |
fi | |
if [ $# -lt 3 ] |
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
{ | |
"folders": | |
[ | |
{ | |
"path": ".", | |
"folder_exclude_patterns": ["log", "script", "tmp", "doc", "coverage"], | |
"file_exclude_patterns": ["*bak", "*~"] | |
} | |
], |
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
namespace :db do | |
desc 'Create YAML test fixtures from data in an existing database. | |
Defaults to development database. Set RAILS_ENV to override.' | |
task :extract_fixtures => :environment do | |
sql = "SELECT * FROM %s" | |
skip_tables = ["schema_migrations", "sessions"] | |
ActiveRecord::Base.establish_connection | |
tables = ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : ActiveRecord::Base.connection.tables - skip_tables | |
tables.each do |table_name| |
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
~% defaults write com.apple.dock single-app -bool true | |
~% killall Dock | |
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
mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes; cd ~/Library/Developer/Xcode/UserData/FontAndColorThemes; curl -O http://developers.enormego.com/assets/egotheme/EGOv2.dvtcolortheme |
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/bash | |
for i in {1..100} | |
do | |
echo `curl -X 'OPTIONS' -H 'X-TriviaSports-Token: 62dcae5a5a6efc710391e537cd777fcd' https://triviasports-preproduction.chugulu.com/api/games/start > /dev/null`; | |
echo `curl -X 'GET' -H 'X-TriviaSports-Token: 62dcae5a5a6efc710391e537cd777fcd' https://triviasports-preproduction.chugulu.com/api/games/start > /dev/null`; | |
done; |
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
def self.test(name) | |
define_method("test_#{name.gsub(' ', '_').downcase}") do | |
yield | |
end | |
end |
OlderNewer