Skip to content

Instantly share code, notes, and snippets.

@pcottle
pcottle / bashrc
Last active October 8, 2015 13:07
bashrc
export EDITOR=vim
source ~/git-completion.bash
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
@pcottle
pcottle / gist:3336177
Created August 13, 2012 01:18
My vimrc
set incsearch
set wildmenu
set ruler
set ignorecase
set smartcase
set noerrorbells
set modeline
set ls=2
set cursorline
imap ii <Esc>
@pcottle
pcottle / why does this not exist!?!?
Created July 1, 2012 05:05
color string parser
/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* @link http://www.phpied.com/rgb-color-parser-in-javascript/
* @license Use it if you like it
* MODIFICATIONS by Peter Cottle :D
*/
function Color(color_string)
{
// if it's an object, just clone and return
@pcottle
pcottle / hack.sh
Created March 31, 2012 16:53 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2266714/hack.sh | sh
#