Skip to content

Instantly share code, notes, and snippets.

View joshuajabbour's full-sized avatar

J. Felix Etcetera joshuajabbour

View GitHub Profile
Candidate Address
Jeb Bush PO Box 440669 Miami FL 33144
Ben Carson 1800 Diagonal Road Ste 140 Alexandria VA 22314
Chris Christie PO Box 225 Colonia NJ 07067
Ted Cruz PO Box 25376 Houston TX 77265
Carly Fiorina 1020 N Fairfax St Ste 200 Alexandria VA 22314
Jim Gilmore PO Box 29322 Henrico VA 23242
Lindsey Graham PO Box 2732 Columbia SC 29202
Mike Huckabee PO Box 3357 Little Rock AR 72203
Bobby Jindal PO Box 5101 Baton Rouge LA 70821
@joshuajabbour
joshuajabbour / GitHub Wiki Subtree Storage.markdown
Created January 22, 2014 23:10
Store and edit GitHub wikis within the main project repository.

Project documentation

The project documentation (stored in the docs directory) is a git subtree of the project wiki. This allows for the documentation to be referenced and edited from within the main project.

Initial local setup

When cloning the main project repository for the first time, the wiki repository must be added as a remote.

git remote add wiki https://github.com//.wiki.git

@joshuajabbour
joshuajabbour / .profile
Created March 10, 2011 18:44
Git Bash tools: Bash completion and shell prompt to list current branch/dirty status. Add this code to your .profile or .bash_profile or .bashrc.
##
# Bash completion scripts
##
if type brew > /dev/null 2>&1 && [ -f `brew --prefix`/etc/bash_completion ]; then
# Homebrew: http://mxcl.github.com/homebrew/
. `brew --prefix`/etc/bash_completion
fi
if [ -f /contrib/completion/git-completion.bash ]; then
@joshuajabbour
joshuajabbour / .gitconfig
Created March 10, 2011 18:43
Git Config: Rename this file ".gitconfig" and place inside your home directory.
##
# This file should be renamed ".gitconfig" and placed inside your home directory.
##
[user]
name = YOUR_NAME
email = YOUR_EMAIL
[github]
user = YOUR_GITHUB_USERNAME
token = YOUR_GITHUB_TOKEN
@joshuajabbour
joshuajabbour / gist:864614
Created March 10, 2011 18:38
Git(Hub) Drupal Project Development Model

Setup

Configure git by using the template for .gitconfig, and adding commands for a Git-aware prompt to .profile.

To clone the repository (the "template" parameter is important):
git clone git@github.com:user/repo.git --template=/PATH/TO/TEMPLATES

Also run (this will set up the repository so a branch can be pushed only while on that branch):
git config remote.origin.push HEAD

@joshuajabbour
joshuajabbour / git last
Created February 25, 2011 22:49
Shows all local and remote commits for X user over the last Y days. Add to your .gitconfig -- Usage: `git last Y X` (author name can be partial)
[alias]
last = "!fn() { S=1; A=`git config --get user.name`; if [ -n \"$1\" ]; then S=\"$1\"; shift; fi; if [ -n \"$1\" ]; then if [ \"$1\" != \"me\" ]; then A=\"$1\"; fi; shift; fi; git log -i --since=\"$S days ago\" --author=\"$A\" --branches --remotes --format='%C(yellow)%t%Creset %s (%an)' \"$@\"; }; fn"
To config Mac OS X Terminal to move (left and right) word-by-word:
- Esc + b (left)
- Esc + f (right)
To configure it to Alt + left and right arrows:
- Open Terminal preferences (command + ,);
- At Keyboard tab, select "control cursor left (or right)" and doubleckick it;
- Left: Select the combo "modifier" to "option" and the action to \033b
- Right: Select the combo "modifier" to "option" and the action to \033f