Skip to content

Instantly share code, notes, and snippets.

View nbomberger's full-sized avatar

Nathaniel Bomberger nbomberger

View GitHub Profile
@nbomberger
nbomberger / .gitignore
Last active December 18, 2015 17:09
Git ignore for xcode projects - totally hijacked from this thread on stackoverflow: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.1
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
# - added line-by-line explanations for EVERYTHING (some were missing)
#
@nbomberger
nbomberger / README.md
Last active December 18, 2015 06:09 — forked from xoebus/README.md

imsg

Send iMessages from the Command Line


Install

Just run the following in your shell:

git remote add --track master upstream git://github.com/upstreamname/projectname.git
# configuration for osx clipboard support
set-option -g default-command "reattach-to-user-namespace -l sh"
@nbomberger
nbomberger / template
Last active December 17, 2015 00:09 — forked from Gen2ly/template
This is a Bash script template with colors. I replaced the '\e' with '\x1B' to make it work with OSX's terminal colors.
#!/bin/bash
# Description of script
# Required program(s)
req_progs=(prog1 prog2)
for p in ${req_progs[@]}; do
hash "$p" 2>&- || \
{ echo >&2 " Required program \"$p\" not installed."; exit 1; }
done
@nbomberger
nbomberger / template-basic
Created May 4, 2013 21:58 — forked from Gen2ly/template-basic
This is a Bash script template.
#!/bin/bash
# Description of script
# Display usage if no parameters given
if [[ -z "$@" ]]; then
echo " ${0##*/} <input> - description"
exit
fi
# Required program(s)
@nbomberger
nbomberger / autoloader.php
Last active December 16, 2015 18:08 — forked from adriengibrat/l.php
PSR-0 Compliant autoloader.
/**
* Small PSR-0 compliant autloader
*/
<?php
set_include_path(get_include_path().PATH_SEPARATOR.__DIR__);
spl_autoload_register(
function ($c) {
@include preg_replace('#\\\|_(?!.*\\\)#','/',$c).'.php';
}
);
<?php
namespace Renoir\AggregationBundle;
/**
* Abstract client to use for each Client
*
* Example location: src/Renoir/AggregationBundle/AbstractClient.php
**/

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.