Robert Evans revans

View git-pr
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
 
set -e
 
arg=$1
 
function specific_pull_request() {
echo "Fetching Pull Request '${arg}' from Github..."
git fetch origin pull/$arg/head:pr-$arg
}
View project-web-reload.conf
1 2 3 4 5 6 7 8
# /etc/init/project-web-reload.conf
 
pre-start script
initctl restart project-web
sleep 15
end script
 
exec /usr/local/rvm/bin/default_bluepill restart
View breadcrumb.scss
1 2 3 4 5 6 7 8 9
/****************************/
 
If coming from the list page
 
<div class="list-breadcrumb">
Breadcrumb code
</div>
 
If coming from the spot page
View .bash_profile
1 2 3 4 5 6 7 8 9 10
# Make sure packages know OSX is 64bit
export ARCHFLAGS='-arch x86_64'
 
# Homebrew Path Setup
export PATH=/usr/local/bin:/usr/local/sbin/:$HOME/bin:$PATH
 
# NPM Path Setup
export PATH=$PATH:/usr/local/share/npm/lib/node_modules
 
# Rbenv Path Setup
View mac-installer.sh
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env bash
set -e
 
# setup colors to indicate good, ok, and bad for test coverage
green="\033[0;32m"
red="\033[0;31m"
reset="\033[0m"
 
msg() {
echo "${green}\n$1${reset}"
View Instructions.mkd

Ruby & Rails

If you're unfamiliar or looking to get more familiar with Ruby & Rails, then checkout this tutorial and this learning site.

System Setup

Installing Homebrew will make it much easier to install the necessary libraries.

View osx_installer.sh
1 2 3 4 5 6 7 8 9
#!/usr/bin/env bash
#
# Homebrew & Ruby setup for OSX
#
set -e
 
# Setup some array's
declare -a brew_libs=(apple-gcc42 openssl readline zlib libxml2 libyaml librsvg libiconv git curl solr wget redis sqlite memcached ack phantomjs mysql node)
declare -a rbenv_plugins=(ruby-build rbenv-vars rbenv-default-gems rbenv-gem-rehash)
View chat.rb
1 2 3 4 5 6 7 8 9 10
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
 
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
 
get '/stream', provides: 'text/event-stream' do
View gist:5304506
1 2 3 4 5 6 7 8 9 10
#######################################################################
# Setup Paths
 
function prepend_to_path -d "Prepend the given dir to the PATH if it exists and is not already
included within the PATH"
if test -d $argv[1]
if not contains $argv[1] $PATH
set -gx PATH "$argv[1]" $PATH
end
end
View install_postgis_osx.sh
1 2 3 4 5 6 7 8 9 10
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
 
#1. Install PostgreSQL postgis and postgres
 
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Something went wrong with that request. Please try again.