Skip to content

Instantly share code, notes, and snippets.

View paltman's full-sized avatar

Patrick Altman paltman

View GitHub Profile
@paltman
paltman / Capfile
Created July 27, 2008 04:10 — forked from trey/Capfile
set :application, "clever_name"
set :user, "deploy"
set :scm_username, "you"
set :repository, "git@github.com:#{scm_username}/#{application}.git"
set :deploy_to, "/var/www/apps/#{application}"
set :scm, :git
set :django_location, "/usr/local/django/trunk"
set :django_admin_media, "/django/contrib/admin/media"
set :domain, "example.com"
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either. Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git@github.com:paltman/<private_repo>.git
fetch = +refs/heads/*:refs/remotes/origin/*
$ git clone git@github.com:<USER>/<REPO>.git <PARENT>
Initialized empty Git repository in /path/to/<PARENT>/.git/
fatal: exec index-pack failed.
fatal: index-pack failed
remote: Counting objects: 2093, done.
remote: Compressing objects: 100% (1842/1842), done.
@paltman
paltman / pylink.sh
Created November 21, 2008 21:52 — forked from zvoase/pylink.sh
added a check for empty SITE_PACKAGES variable
@paltman
paltman / gist:43613
Created January 6, 2009 00:52
Post Email to Delicious Script
## Requires:
## svn checkout http://feedparser.googlecode.com/svn/trunk/ feedparser
## svn checkout http://pydelicious.googlecode.com/svn/trunk/ pydelicious
import sys, os, imaplib, email
from pydelicious import DeliciousAPI, DeliciousItemExistsError
MAIL_IMAP_SERVER = 'imap.gmail.com'
MAIL_IMAP_SSL_PORT = 993
MAIL_IMAP_USERNAME = 'XXXXXXXXXX@gmail.com'
class kewlness(object):
def __init__(self, func):
self.func = func
def __call__(self, *args, **kwargs):
if len(args) > 0:
self.new_thing = args[0]
return self.func(*args, **kwargs)
def __repr__(self):
return self.func.__doc__
@paltman
paltman / gist:97440
Created April 18, 2009 04:52
Greasemonkey Userscript to show commit detail in FogBugz tickets for GitHub commits
// ==UserScript==
// @name githubugz
// @namespace paltman.com
// @description Show commit details in FogBugz Tickets
// @include https://*.fogbugz.com
// ==/UserScript==
// Set up configuration values by going to about:config in Firefox and changing
// the following parameters:
//
// greasemonkey.scriptvals.paltman.com/githubugz.user
from django.db import models
from django.utils import simplejson as json
from django.conf import settings
from datetime import datetime
class JSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime):
return obj.strftime('%Y-%m-%d %H:%M:%S')
@paltman
paltman / pylink.sh
Created February 28, 2010 05:19 — forked from zvoase/pylink.sh