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
# Put this in your ~/.gitconfig or ~/.config/git/config | |
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName> | |
[user] | |
name = Your Full Name | |
email = [email protected] | |
[color] | |
# Enable colors in color-supporting terminals | |
ui = auto | |
[alias] | |
# List available aliases |
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
#!/usr/bin/python3.1 | |
# This is script that extracts the trees of two commits to temporary | |
# directories and then runs meld on both directories, so you can compare | |
# them using meld's nice recursive browsing interface. | |
# | |
# This is for an answer to this question: | |
# http://stackoverflow.com/questions/2006032/view-differences-of-branches-with-meld | |
from subprocess import call, Popen, PIPE, check_call |
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
/** | |
* converted stringify() to jQuery plugin. | |
* serializes a simple object to a JSON formatted string. | |
* Note: stringify() is different from jQuery.serialize() which URLEncodes form elements | |
* UPDATES: | |
* Added a fix to skip over Object.prototype members added by the prototype.js library | |
* USAGE: | |
* jQuery.ajax({ |
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
JSCLASS_PATH = 'build/min'; | |
require('./' + JSCLASS_PATH + '/loader'); | |
JS.require('JS.Deferrable'); | |
Promise = new JS.Class({ | |
include: JS.Deferrable, | |
initialize: function(value) { | |
if (value !== undefined) this.succeed(value); |
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
import ast | |
from cStringIO import StringIO | |
import sys | |
INFSTR = '1e308' | |
def interleave(inter, f, seq): | |
seq = iter(seq) | |
try: | |
f(next(seq)) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Example of Singleton design pattern | |
# Copyright (C) 2011 Radek Pazdera | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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
"this is the cconfiguration file for linux and mac systems | |
"symlink this to your home folder as .vimrc | |
call pathogen#runtime_prepend_subdirectories(expand('~/.vim/bundles')) | |
call pathogen#helptags() | |
"call pathogen#runtime_append_all_bundles() | |
source ~/.vimrc_main |
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
# configuration for osx clipboard support | |
set-option -g default-command "reattach-to-user-namespace -l sh" |
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
var pubsub = {}; | |
(function(q) { | |
var topics = {}, subUid = -1; | |
q.subscribe = function(topic, func) { | |
if (!topics[topic]) { | |
topics[topic] = []; | |
} | |
var token = (++subUid).toString(); | |
topics[topic].push({ | |
token: token, |
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
/*! ****************************** | |
Handlebars helpers | |
*******************************/ | |
// debug helper | |
// usage: {{debug}} or {{debug someValue}} | |
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/) | |
Handlebars.registerHelper("debug", function(optionalValue) { | |
console.log("Current Context"); | |
console.log("===================="); |
OlderNewer