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 | |
# Remove from .gitignore and check this into your repo!!! | |
if [[ "Linux" = "$(uname)" ]] ; then | |
# Production | |
gemset_name="mindworx" | |
else | |
# Development | |
gemset_name="othergemsetname" |
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
export RUBY_HEAP_MIN_SLOTS=1000000 | |
export RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=1000000000 | |
export RUBY_HEAP_FREE_MIN=500000 |
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 | |
# | |
# Copyright (c) 2007 Bradley Taylor, [email protected] | |
# | |
# Modifications by Wayne E. Seguin | |
# | |
# mongrel_cluster Startup script for Mongrel clusters. | |
# | |
# chkconfig: - 85 15 | |
# description: mongrel_cluster manages multiple Mongrel processes for use \ |
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
function rvm_require_ruby | |
{ | |
if ! rvm list strings | grep -q "^$1" ; then | |
echo "ERROR: Requires Ruby Version: '$1'" | |
return 1 | |
fi | |
return 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
#!/usr/bin/env bash | |
cloop () { | |
# First parameter is $1, second is $2, etc... | |
# If you want to capture all arguments use "$@" | |
# Here we declare a local variable promoting clarity | |
local command="$@" | |
# ':' denotes true in shell scripting. | |
while : ; do |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
PS1="\u@\h \w \$(parse_git_branch)$ " | |
if [[ -f ~/.bashrc ]] ; then source ~/.bashrc ; fi |
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
#rvm_trust_rvmrcs=1 # <= This goes in ~/.rvmrc | |
create_file ".rvmrc", "rvm --create 1.9.2@#{appname}" | |
# Note I removed --pre since Bundler is 1.0.0 now. | |
# Also note that by default `` and system() runs via 'sh' not bash, hence the | |
# bash -l -c... | |
run "/bin/bash -l -c 'cd path/to/new/app; gem install bundler ; bundle install'" |
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 | |
project_root="${project_root:-"/srv/cms/current/"}" | |
home_dir="${home_dir:-"/home/capdeploy"}" | |
rvm_path="${rvm_path:-"$home_dir/.rvm"}" | |
port="${1:-8000}" | |
environment="${2:-production}" | |
pids_path="${project_root}/tmp/pids/" | |
command="${3:-start}" |
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
rvm --create use default@myproject | |
[[ -s myproject.gems ]] && rvm gemset import myproject.gems | |
command -v bundle && bundle install |
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
apillet@russell:~$ cat foo.rb | |
FOO = 123 | |
apillet@russell:~$ irb | |
ruby-1.9.2-preview1 > $:.unshift(Dir.pwd) | |
ruby-1.9.2-preview1 > require 'foo' |