Skip to content

Instantly share code, notes, and snippets.

View petercamfield's full-sized avatar

Peter Camfield petercamfield

View GitHub Profile
@petercamfield
petercamfield / .bashrc
Last active October 4, 2019 07:57
Open all files listed by git diff in Visual Studio
alias vsd='"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe" //edit $(git diff --name-only)'
@petercamfield
petercamfield / .bashrc
Created August 17, 2017 14:51
Useful git aliases
alias gh='history | grep "\sgit\s" | tail'
alias gs='git status'
alias gl="git log --pretty=format:'%C(yellow)%h %C(blue)%>(12,trunc)%ar %C(magenta)%<(15,trunc)%aN %Creset%s' -10"
@petercamfield
petercamfield / .bashrc
Created August 19, 2016 14:49
Display the time and status of last command in BASH
function prompt_command {
es=$?
tput sgr0
tput sc
let xpos=$(tput cols)-10
tput cuf $xpos
tput dim
if [ $es -eq 0 ]
then
tput setab 2
@petercamfield
petercamfield / gist:3776038
Created September 24, 2012 13:47
CoffeeScript test runner in 1 line
test= (e)-> throw e unless e()
square = (x) -> x * x
test -> square(5)==25
test -> square(5)==24