Skip to content

Instantly share code, notes, and snippets.

@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@hrldcpr
hrldcpr / tree.md
Last active May 1, 2024 00:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@jseabold
jseabold / translate.py
Created December 13, 2011 18:58
Use Google Translate API from Python
# -*- coding: utf-8 -*-
"""
You need to fill in your API key from google below. Note that querying
supported languages is not implemented.
Language Code
-------- ----
Afrikaans af
Albanian sq
Arabic ar
@hippietrail
hippietrail / stripgutenberg.pl
Created December 22, 2010 18:59
Strip headers/footers from Project Gutenberg texts
#!/usr/bin/perl
# stripgutenberg.pl < in.txt > out.txt
#
# designed for piping
# Written by Andrew Dunbar (hippietrail), released into the public domain, Dec 2010
use strict;
my $debug = 0;
@terceiro
terceiro / git error when pulling via HTTP
Created February 8, 2010 20:51
SOLVED: git error when pulling via HTTP
error: unknown object type 5 at offset 4464021 in .git/objects/pack/pack-206ed5349a0687c7baebeaf9d20f1d4eeb123174.pack
error: failed to read delta base object 28fa12d1a854b14fbf37999f05964b00471281d7 at offset 4464021 from .git/objects/pack/pack-206ed5349a0687c7baebeaf9d20f1d4eeb123174.pack
error: unknown object type 5 at offset 4458084 in .git/objects/pack/pack-206ed5349a0687c7baebeaf9d20f1d4eeb123174.pack
error: failed to read delta base object bbe0a7e02f0b26c918b7d9e2b2a245b0376ec6b6 at offset 4458084 from .git/objects/pack/pack-206ed5349a0687c7baebeaf9d20f1d4eeb123174.pack
error: inflate: data stream error (incorrect header check)
error: failed to read delta base object 961cbddd398ff0ec229ffa50124bac40b80c39f0 at offset 4464884 from .git/objects/pack/pack-206ed5349a0687c7baebeaf9d20f1d4eeb123174.pack
error: unknown object type 5 at offset 4457057 in .git/objects/pack/pack-206ed5349a0687c7baebeaf9d20f1d4eeb123174.pack
error: failed to read object 53b1c0003620c4f0cb004785240f2b0ce70bb068 at offset 4457057 f