Skip to content

Instantly share code, notes, and snippets.

View timshadel's full-sized avatar

Tim Shadel timshadel

View GitHub Profile
@timshadel
timshadel / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@timshadel
timshadel / .gitignore
Last active December 22, 2015 09:49 — forked from mbostock/.block
node_modules
@timshadel
timshadel / .gitignore
Last active December 22, 2015 09:29 — forked from mbostock/.block
node_modules
@timshadel
timshadel / app-password.js
Last active December 12, 2015 01:08 — forked from camshaft/app.js
/**
* Module dependencies
*/
var request = require("superagent"),
password = require("password"),
password.initialize(require("password-bearer"));
/**
* Make the request
*/
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
+ (NSString *)platform;
//
// UIImage+H568.h
//
// Created by Angel Garcia on 9/28/12.
// Copyright (c) 2012 angelolloqui.com. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImage (H568)
#!/usr/bin/env macruby
# From: http://www.stompy.org/2008/08/14/xcode-and-git-another-build-script/
# Expanded from here: http://www.furmanek.net/36/using-macruby-to-set-xcode-project-version-from-git/
# Xcode auto-versioning script for Subversion by Axel Andersson
# Updated for git by Marcus S. Zarra and Matt Long
# Converted to ruby by Abizern
# Converted to MacRuby by Gregory Furmanek
# Merged with MacRuby version by elliottcable
# Dirty handling, style and build-only version update by timshadel
@timshadel
timshadel / .bashrc
Created January 28, 2009 22:40 — forked from tekkub/.bashrc
Bold your current git branch on the command line (tested on Mac OS X)
TERM=xterm-color
# \[ starts a sequence of non-printable chars
# \] ends that sequence
# \e[1m turns text that follows Bold
# \e[m turns text that follows Normal
#
# \[\e[1m\] tells the shell not to count the non-printable bold command in it's wrapping calculations
# \[\e[m\] tells the shell not to count the non-printable normal command in it's wrapping calculations
#
# Unlike HTML <b></b> elements; this is more like <b>...<normal> It's important that the shell counts
@timshadel
timshadel / .bashrc
Created January 28, 2009 22:37 — forked from tekkub/.bashrc
Use git-symbolic-ref instead of git-branch for showing current branch on the commandline
parse_git_branch() {
git symbolic-ref HEAD 2> /dev/null | cut -d/ -f3- | sed -e 's/\(.*\)/ (\1)/'
}
PS1="\w\$(parse_git_branch) $ "