Skip to content

Instantly share code, notes, and snippets.

@reecefowell
reecefowell / composer.json
Created January 29, 2014 20:06
composer.json for CCDN
{
"name": "codeconsortium/ccdn-sandbox",
"description": "The \"CodeConsortium Standard Edition\" distribution",
"license": "MIT",
"type": "project",
"autoload": {
"psr-0": { "": "src/" }
},
"minimum-stability": "dev",
"repositories": [
/*******************************************************************************
1. DEPENDENCIES
*******************************************************************************/
var gulp = require('gulp'); // gulp core
sass = require('gulp-sass'), // sass compiler
uglify = require('gulp-uglify'), // uglifies the js
jshint = require('gulp-jshint'), // check if js is ok
rename = require("gulp-rename"); // rename files
concat = require('gulp-concat'), // concatinate js
/*
* Copyright 2008-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

Install MAMP Development stack on Mountain Lion using MacPorts

NOTE: I like to prepend some of the commands with time just for curiosity’s sake to see how long it takes.

Turn off the built-in Apache

Go to System Preferences -> Sharing -> uncheck the Personal Web sharing. You will never turn Apache on/off here again.

Install Xcode via Mac App Store

@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
@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 / 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

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 / gist:4966533
Created February 16, 2013 11:46
Crapola
interface ChainedInterface
{
public function init();
public function prerequisites();
}
class SetupVHost implements ChainedInterface
{
public function init()
@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).