Skip to content

Instantly share code, notes, and snippets.

View wayneeseguin's full-sized avatar
🤪

Wayne E Seguin wayneeseguin

🤪
View GitHub Profile
# This example shows how to setup an environment running Rails 3 (beta) + ripple (for riak) under ruby 1.9.1 with a 'riak' gem set.
∴ rvm update --head
# ((Open a new shell))
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.1
# Use the ruby + gem set
∴ rvm 1.9.1%riak
if [[ -s /home/somms/.rvm/scripts/rvm ]] ; then source /home/somms/.rvm/scripts/rvm ; fi
# ~/.bashrc: executed by bash(1) for non-login shells.
export PS1='\h:\w\$ '
umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
#!/bin/bash
# Merge conflict check.
if grep -iR "<<<<<<" ./* || grep -iR ">>>>>" ./* ; then
echo "\nERROR:\nYou have merge conflicts. \nPlease resolve them and try again.\n"
exit 1
fi
# Correct
My .bash_profile:::
<< Heap of stuff from default ubuntu install that was under the &&return line>>
# Be sure all paths / environment setup before sourcing RVM
#RVM
if [[ -s /home/steve/.rvm/scripts/rvm ]]; then
source /home/steve/.rvm/scripts/rvm ;
# Switch to Ruby 1.8.7
rvm use 1.8.7
# Print out the ruby version
ruby -v
# But the output of this is:
#
# $ ./tryrvm
# <i> Now using ruby 1.8.7 p249 </i>
@wayneeseguin
wayneeseguin / roll.rb
Created April 1, 2010 14:51 — forked from jhsu/roll.rb
# Final Countdown
# config.middleware.use Roll
class Roll
def initialize(app)
@app = app
end
def call(env)
request = Rack::Request.new(env)
ip = request.ip
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
if [[ ! -z "$PS1" ]] ; then
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoreboth
We couldn’t find that file to show.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
if [[ ! -z "$PS1" ]] ; then
# don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups
# check the window size after each command and, if necessary,