Skip to content

Instantly share code, notes, and snippets.

@pgib
pgib / .profile
Last active December 27, 2015 01:29
export TERM="screen-256color"
if tty -s; then
if [ -z "$WINDOW" ]; then
if tmux has-session -t devops; then
echo -n "tmux found. Re-attach? [Y/n]: "
read response
case $response in
N*|n*)
echo "Okay. Type 'tmux attach' later..."
@pgib
pgib / README.md
Last active December 24, 2015 15:19
Throw this in your Jekyll `_plugins/ext.rb` or into a separate file.

Terminal Notifier for Jekyll site builds

This Jekyll monkey patch triggers a Mac OS X Notification Center notification using the terminal-notifier gem.

If you start jekyll without bundle, first install the necessary gems:

gem install terminal-notifier
gem install terminal-notifier-guard

If you start jekyll with bundle exec (ie. bundle exec jekyll serve --watch, ensure the above two gems are in your Gemfile:

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: