Skip to content

Instantly share code, notes, and snippets.

View Sutto's full-sized avatar

Darcy Laycock Sutto

View GitHub Profile
#!/usr/bin/env bash -e
source "$rvm_scripts_path/rvm" || true
rvm install ruby-1.8.7-p299 -C '--enable-shared,--with-readline-dir='"$rvm_path"'/usr'
rvm install rbx-1.0.1-20100603
#!/usr/bin/env sh
source ~/.rvm/scripts/rvm
! command -v ruby >/dev/null 2>&1 || command -v ruby | grep -v rvm >/dev/null
echo "Result = $?"
echo "<pre>"
echo "rvm_path = '$rvm_path'"
echo "$rvm_environments_path"
echo "---"
rvm alias list
echo "--"
#!/usr/bin/env bash
source "$HOME/.rvm/scripts/rvm"
if command -v __rvm_load_rvmrc >/dev/null; then
__rvm_load_rvmrc
fi
exec ruby "$@"
@Sutto
Sutto / setup_load_paths.rb
Created July 17, 2010 23:36
Automatic .rvmrc detection + bundler setup on passenger
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
rvm_lib_path = File.join(rvm_path, 'lib')
# Differentiate between new and old passenger versions
if File.exist?(File.join(rvm_lib_path, "rvm", "environment.rb"))
$LOAD_PATH.unshift rvm_lib_path
require 'rvm'
RVM.use_from_path! Dir.pwd # Passenger starts in the app root
end
end
set :default_environment, {
'PATH' => '/home/joey/.rvm/gems/ree-1.8.7-2010.02@vk/bin:/home/joey/.rvm/gems/ree-1.8.7-2010.02@global/bin:/home/joey/.rvm/rubies/ree-1.8.7-2010.02/bin:/home/joey/.rvm/bin:$PATH',
'RUBY_VERSION' => 'ree-1.8.7-2010.02',
'GEM_HOME' => '/home/joey/.rvm/gems/ree-1.8.7-2010.02@vk',
'GEM_PATH' => '/home/joey/.rvm/gems/ree-1.8.7-2010.02@vk:/home/joey/.rvm/gems/ree-1.8.7-2010.0@global',
'BUNDLE_PATH' => '/home/joey/.rvm/gems/ree-1.8.7-2010.02@vk' # If you are using bundler.
}
#!/usr/bin/env zsh
if [[ -s "${TM_PROJECT_DIRECTORY}/.rvmrc" ]]
then
source "${TM_PROJECT_DIRECTORY}/.rvmrc"
fi
exec ruby "$@"

YouthTree Developer Overview

Organization Strategy

Currently, tools are documented typically in a relatively unorganized manner - Tim and I (Darcy) typically communicate over skype to discuss featueres and we have google docs with lists of items. We use a very ghetto method of marking progress (red means awaiting work, green is done) and to be honest it makes it hard to keep track of what is going on.

#!/usr/bin/env bash
if [[ -z "$1" ]] || [[ -z "$2" ]] ; then exit 1 ; fi
if [[ -n "$(echo "$1" | awk "/${2}/")" ]] ; then exit 0 ; else exit 1 ; fi
rails_version() {
which -s rails && rails -v 2>/dev/null | sed 's/Rails //'
}
r() {
local name="$1"
shift
if [[ -z "$name" ]]; then
echo "Usage: $0 command *args" >&2
return 1