Skip to content

Instantly share code, notes, and snippets.

View antoniorosado's full-sized avatar

Antonio Rosado antoniorosado

View GitHub Profile
@antoniorosado
antoniorosado / .gitignore
Created May 19, 2011 01:49
my xCode gitignore
.DS_Store
build
*.mode1v3
*.mode2v3
*.nib
*.swp
*.pbxuser
*.perspective
*.perspectivev3
//Add a method to the validator that checks to see if at least one of the
// three checkboxes specified are checked.
jQuery.validator.addMethod('atLeastOneChecked', function(value, element) {
var checkedCount = 0;
if (jQuery('#checkBoxListOne').is(':checked')){
checkedCount += 1;
}
if (jQuery('#checkBoxListTwo').is(':checked')){
@antoniorosado
antoniorosado / alias
Created November 14, 2012 12:42
git and bash alias
# Add on the top of the ~/.bash_profile on mountain Lion and ~/.bashrc on ubuntu
# colors on the terminal
#export CLICOLOR=1
#export LSCOLORS=GxFxCxDxBxegedabagaced
export TERM="xterm-color"
PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ '
# terminal related alias
alias ls='ls -lisa'
@antoniorosado
antoniorosado / colors-for-prompt-and-bash
Created November 18, 2012 11:22
List of colors for prompt and Bash
List of colors for prompt and Bash
Add this to your Bash file(s) to define colors for prompt and commands:
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
tar -xvzf ruby-1.9.3-p392.tar.gz
cd ruby-1.9.3-p392/
./configure --prefix=/usr/local
make
make install