Skip to content

Instantly share code, notes, and snippets.

View josnidhin's full-sized avatar

Jose Davis Nidhin josnidhin

View GitHub Profile
@josnidhin
josnidhin / gist:2822114
Created May 29, 2012 01:55
Installing RVM and Ruby 1.9 on AWS Linux AMI
sudo -s
yum update
groupadd rvm
gpasswd -a ec2-user rvm
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
@josnidhin
josnidhin / git_prompt.sh
Last active May 30, 2018 06:23
Display the current git branch name in bash
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function git_prompt {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"