Geeking Out

Git Automation

If you use Git a lot and find yourself doing the same things over an over, then a script can help save time and typing. Feel free to copy/paste my code to automate certain repetitive tasks like managing stashes and committing and merging. I prefix my Git commands with 'gt' and then some kind of shorthand for a command.


Shortcuts defined in your shell profile (.bash_profile, .bashrc, etc)"
alias gtstshls='git stash list'
alias gtstshaply=/YOUR/PATH/TO/THIS/FILE/

Apply a stash with 'gtstshaply n' where n is a stash number:


# Author: Clif Jackson
# Email:

if [ "$#" -ne 1 ]; then
    echo "You must supply a stash index "

echo "Are you sure you want to apply stash@{$1}? [y/n] "
while read -r -n 1 -s answer; do
    if [[ $answer != "y" ]]; then
        echo "Done "
        git stash apply stash@{$1}
        git stash list

Mac OS X Mods

Show hidden files in the Finder (all versions):

  • Navigate to ~/Library/Preferences/
  • open in a text editor (no admin rights needed!).
  • add the two yellow lines below and then reboot your computer (you may be able to just log out & log in again):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Web Stuff

A cross-platform way to avoid phone numbers, email addresses, dates, etc from displaying as links:

Break up the pattern with <span> tags.

raw numbers: 123-456-7890
mark up: <span>1</span>2<span>3-</span>45<span>6-7</span>8<span>90</span>
rendered: 123-456-7890

Of course, you can also use the iOS specific way of using a <meta> tag:

<meta name="format-detection" content="telephone=no"> :: web :: geeking out