This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
tidy = !git branch --merged master | grep -v 'master$' | xargs git branch -d && git remote | xargs -n 1 git remote prune |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Serve 1Password anywhere from the Dropbox folder | |
server { | |
listen 80; | |
server_name 1password; | |
root /home/kflorence/Dropbox/1Password.agilekeychain; | |
location / { | |
index 1Password.html; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# Nicer looking prompt with git branch in it | |
# https://github.com/mbadolato/iTerm2-Color-Schemes | |
export PS1="\[\033[36m\]\u\[\033[m\]:\[\033[33;1m\]\w\[\033[m\]\[\033[35;1m\]\$(parse_git_branch)\[\033[m\]\$ " | |
# ls colors | |
export CLICOLOR=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
// $.widget-lite | |
$.plugin = function(name, base, prototype) { | |
if (!prototype) { | |
prototype = base; | |
base = function(options, element) { | |
if (arguments.length) { | |
$.data(element, name, this); | |
this.element = $(element); | |
this._init(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fixes binding the "change" event to checkboxes and select[type=multiple] | |
* for Internet Explorer. | |
* | |
* @param {jQuery|Element|Element[]} elements | |
* The DOM Element we wish to bind the event to. | |
* | |
* @param {String} eventType | |
* The name of the event we want to bind to. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( jQuery ) { | |
jQuery.extend({ | |
attached: function( elem ) { | |
if ( elem instanceof jQuery ) { | |
elem = elem[ 0 ]; | |
} | |
return jQuery.contains( elem.ownerDocument.documentElement, elem ); | |
}, | |
detached: function( elem ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( jQuery ) { | |
// Determines if we can treat an object like an array. | |
var isArrayLike = function( obj ) { | |
var length; | |
// Supports arrays, jQuery objects, nodeLists and HTMLCollections | |
// Should also support function arguments, but there is no cross-browser way... | |
return obj && ( obj instanceof jQuery || ( typeof obj === "object" && | |
!jQuery.isWindow( obj ) && ( typeof ( length = obj.length ) === "number" && | |
( obj.item && ( obj.namedItem || jQuery.isFunction( obj.item ) ) ) ) || jQuery.isArray( obj ) ) ); |
OlderNewer