Skip to content

Instantly share code, notes, and snippets.

View kevinohara80's full-sized avatar

Kevin O'Hara kevinohara80

View GitHub Profile
@kevinohara80
kevinohara80 / .bash_profile
Last active December 11, 2015 05:19
Here is my command prompt from my .bash_profile. The command prompt detects whether it's in a git project or not and if it is, it indicates the current branch and whether there are un-staged changes pending.
# RETURN ASTERISK WHEN CHANGES ARE PRESENT BUT UNSTAGED
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
# GET THE CURRENT GIT BRANCH
function parse_git_branch() {
if [ -d "./.git" ]; then
git branch 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
fi
@detroitlabradors
detroitlabradors / gist:4235764
Last active October 13, 2015 18:08
Welcome to the Explorers Club

Greetings and Welcome Explorer,

I am glad that you found your way here. You deserve better than another routine day of drudgery aboard the Stellar Patrol Ship Feinstein. I think we want to work with you.

Detroit Labs is in the business of creating mobile apps. We do this by inviting the best and most interesting people to join our team, and asking them to solve the hard problems that go along with building and shipping software. Since you are reading this, you may be one of those people. I hope so!

@kevinswiber
kevinswiber / streamy.js
Created May 24, 2012 18:43
Readable/Writable Stream in Node.js
var Stream = require('stream');
var util = require('util');
var Streamy = function() {
Stream.call(this);
this.readable = true;
this.writable = true;
};
util.inherits(Streamy, Stream);
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt