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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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 | |
# Based on Nathan de Vries' findings http://goo.gl/jbtzX | |
MSPID=$(ps x | grep "MobileSafari" | grep -v grep | awk '{ print $1 }') | |
if [ -z "$MSPID" ]; then | |
echo "Run \"Mobile Safari.app\" in the Simulater to enable remove debugging." | |
exit 1 | |
fi |
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
--- completion.rb 2012-07-18 11:48:41.000000000 +0200 | |
+++ completion-2.rb 2012-07-18 11:53:02.000000000 +0200 | |
@@ -165,6 +165,7 @@ | |
rescue Exception | |
name = "" | |
end | |
+ next unless name.class == String | |
next if name != "IRB::Context" and | |
/^(IRB|SLex|RubyLex|RubyToken)/ =~ name | |
candidates.concat m.instance_methods(false).collect{|x| x.to_s} |
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 ruby | |
require 'irb' | |
require 'irb/completion' | |
require 'selenium/webdriver' | |
require 'capybara/dsl' | |
if ARGV.delete "--chrome" | |
chrome = true |
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
# features/support/capybara.rb | |
# Configure Capybara for use with cucumber. | |
Capybara.configure do |config| | |
# Use iPhone as the default browser. | |
# config.default_driver = :iphone | |
end |
The baseline setup:
- Nginx will be used to reverse proxy to the Rails app (run by unicorn/thin/...)
- A non-privileged user is created, which will be running the app and used for safe deployments
- For this user, we'll install:
- rbenv (https://github.com/sstephenson/rbenv) to manage multiple Ruby versions
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
# Unicorn itself is configured in `config/unicorn.rb`. These are the tasks, | |
# that allow you to control the server through Capistrano's `cap` command. | |
# To understand how Unicorn reacts to each signal, you should really read | |
# http://unicorn.bogomips.org/SIGNALS.html | |
namespace :unicorn do | |
task :start do | |
env = fetch(:rails_env, "production") | |
run <<-EOC |
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 ruby | |
require 'base64' | |
require 'rack/mime' | |
if ARGV.empty? | |
puts "usage: #{File.basename($0)} [glob ...]" | |
exit 0 | |
end |
OlderNewer