Skip to content

Instantly share code, notes, and snippets.

@reecefowell
reecefowell / gist:adeacf013c7c92eb0027
Last active December 30, 2015 22:55 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
assertArrayHasKey()
assertClassHasAttribute()
assertClassHasStaticAttribute()
assertContains()
assertContainsOnly()
assertContainsOnlyInstancesOf()
assertCount()
assertEmpty()
assertEqualXMLStructure()
assertEquals()
@reecefowell
reecefowell / ToDoApp.html
Created May 6, 2013 21:35
Todo list app, written in Javascript. By Reece Fowell.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/base/jquery-ui.css" rel="stylesheet" type="tex/css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
@reecefowell
reecefowell / git-prompt.sh
Created March 31, 2013 03:45
~/.git-prompt.sh
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see the current branch in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
@reecefowell
reecefowell / gist:4966533
Created February 16, 2013 11:46
Crapola
interface ChainedInterface
{
public function init();
public function prerequisites();
}
class SetupVHost implements ChainedInterface
{
public function init()

1) Install git-core

$ sudo port selfupdate               # updates the ports tree and port utility
$ sudo port install git-core +svn    # installs git

2) Create your ~/.git-prompt.sh ~/.bash_rc

Open vi and paste the following code, save file as ~/.git-prompt.sh:

@reecefowell
reecefowell / gitconfig
Created January 23, 2013 06:41
~/.gitconfig
[core]
excludesfile = /Users/reecefowell/Library/Application Support/TorusKnotSoftware/SourceTree/gitignore_default.txt
quotepath = false
ignorecase = false
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Other/Developer/Version Management/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
@reecefowell
reecefowell / gist:4602582
Created January 23, 2013 06:25
Git Bash Colours 2.0
parse_git_branch () {
#git name-rev HEAD 2> /dev/null | sed -e 's/\^0$//' | sed 's#HEAD\ \(.*\)# (\1)#'
#git diff --shortstat
#git show --raw --abbrev-commit --date=local
#BR=$(git log --oneline -n 3 2>/dev/null) || { echo "$@"; exit; }
#br=$(git log --oneline -n 5 2>&1) || br=""
xr=$(git diff HEAD --stat 2>&1) || xr=""
br=$(git ph -n 7 2>&1) || br=""
echo "$xr"
echo "$br"
@reecefowell
reecefowell / gist:4595033
Created January 22, 2013 14:28
cat /proc/cpuinfo; cat /etc/lsb-release ; uname -a
~ cat /proc/cpuinfo; cat /etc/lsb-release ; uname -a
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU W3520 @ 2.67GHz
stepping : 5
cpu MHz : 2659.000
cache size : 8192 KB
fdiv_bug : no