Skip to content

Instantly share code, notes, and snippets.

View sts10's full-sized avatar

Sam Schlinkert sts10

View GitHub Profile
@sts10
sts10 / octo_new_v002
Last active August 29, 2015 13:56
A Bash function for easily creating new Octopress posts (version 0.0.2). Full repo here: https://github.com/sts10/octo_new
# Full github repo here: https://github.com/sts10/ink
function octo_new {
cwd=$(pwd) #save pwd as cwd
cd /Users/$USER/Documents/code/sts10.github.io
rake new_post["$1"]
echo "Creating new octopress post called \""$1"\""
@sts10
sts10 / octo_new
Last active August 29, 2015 13:56
A bash function for creating a new Octopress post from anywhere in the terminal
function octo_new {
cwd=$(pwd) #save pwd as cwd
cd /Users/$USER/Documents/code/sts10.github.io
echo "Creating new octopress post called \""$1"\""
rake new_post["$1"]
cd source/_posts
FILENAME=`ls -t | head -1`
@sts10
sts10 / my_bash_prompt_functions
Last active August 29, 2015 13:56
My bash prompt functions (includes dirty git *)
# Add this parse_git_dirty function.
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
}
# Replace your parse_git_branch function with this one.