Skip to content

Instantly share code, notes, and snippets.

View wayneeseguin's full-sized avatar
🤪

Wayne E Seguin wayneeseguin

🤪
View GitHub Profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
[[ ! -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
This file has been truncated, but you can view the full file.
UPDATE clinical_site_assignments set site_id=1 where id=1;
UPDATE clinical_site_assignments set site_id=2 where id=2;
UPDATE clinical_site_assignments set site_id=2 where id=3;
UPDATE clinical_site_assignments set site_id=2 where id=4;
UPDATE clinical_site_assignments set site_id=2 where id=5;
UPDATE clinical_site_assignments set site_id=2 where id=6;
UPDATE clinical_site_assignments set site_id=2 where id=7;
UPDATE clinical_site_assignments set site_id=2 where id=8;
UPDATE clinical_site_assignments set site_id=2 where id=9;
UPDATE clinical_site_assignments set site_id=2 where id=10;
# ~/.bashrc: executed by bash(1) for non-login shells.
if [[ ! -z "$PS1" ]] ; then
export PS1='\u@\h:\w$ '
umask 022
# Bash Completion
if [[ -f ~/.bash_completion ]] ; then . ~/.bash_completion; fi
# Prompt Settings
if [[ -f ~/.bash_styles ]] ; then . ~/.bash_styles old; fi
# Check for an interactive session
if [[ ! -z "$PS1" ]] ; then
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
fi
# RVM
if [[ -s /home/cremes/.rvm/scripts/rvm ]] ; then source /home/cremes/.rvm/scripts/rvm ; fi
# ~/.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 [ -n "$PS1" ] ; then
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
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'
chromesize () {
ps auxww | GREP_COLOR="1;37;41" LANG=C grep --color=auto [C]hrome | awk '{sum += $6} END{print (sum / 1024) "MB"}'
}
rvm --create use default@myproject
[[ -s myproject.gems ]] && rvm gemset import myproject.gems
command -v bundle && bundle install
This is an example of using RVM's Project .rvmrc file
to have it automatically bootstrap your environment, including bundler.
This could be further expanded to do anything you require :)
The important thing to remember is that the purpose of these files is
to allow you to very easily have your 'project context' (aka 'environment')
loaded automatically for you when you enter the project in the shell (cd).
You can generate the .rvmrc file below by running:
#!/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}"