Skip to content

Instantly share code, notes, and snippets.

View nulltoken's full-sized avatar
💭
I may be slow to respond.

nulltoken nulltoken

💭
I may be slow to respond.
View GitHub Profile
function tomp3() { for f in "$@"; ffmpeg -i $f -acodec libmp3lame -aq 4 "`basename $f .m4a`.mp4"; }
@bennage
bennage / ideas.md
Last active August 29, 2015 14:02
What questions do you have about participating in open source?

Are you new to open source? What sort of questions, concerns, or even fears do you have?

Culture

  • How do I start contributing to other projects?
  • How can I encourage contribution to my project?
  • Who should have commit rights?
  • What commitment am I making by opening my source?
  • How do I establish a community?
  • What expectations will the community have?
@matthewmccullough
matthewmccullough / git-compressing-and-deltas.md
Created May 14, 2012 19:05
Git, Compression, and Deltas - An explanation

Git Compression of Blobs and Packfiles.

Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.

A simple run though of a commit sequence with only the smallest change to the image (in uncompressed TIFF format to amplify the observable behavior) aids the understanding of this deferred and different approach efficiency.

The command sequence:

Create the repo:

@arrbee
arrbee / gist:2141997
Created March 20, 2012 22:34
Sample libgit2 test of commit header parsing
#include "clar_libgit2.h"
#include "repository.h"
#include "signature.h"
typedef struct {
const char *line;
const char *header;
} parse_test_case;
static parse_test_case header_passing_tests[] = {
@carlosmn
carlosmn / newly-unreachable.rb
Created February 6, 2012 23:47
A libgit2 implementation of git fsck --unreachable
#!/usr/bin/env ruby
require 'rubygems'
require 'rugged'
require 'set'
def objects_in_tree(repo, tree, objs)
tree.each do |e|
objs << e[:oid]
if e[:type] == :tree then
<!DOCTYPE html>
<html>
<head>
<title>Histogram</title>
<script type="text/javascript" src="../../d3.js"></script>
<script type="text/javascript" src="../../d3.layout.js"></script>
<script type="text/javascript" src="pseudoMathStats.js"></script>
<script type="text/javascript" src="lhc.js"></script>
<style type="text/css">
@patearl
patearl / transform.sh
Created August 5, 2011 19:49
NHibernate GIT Transform
#!/bin/bash
# To use this, git svn clone the NHibernate repo into an nh-git folder. Use the -s option and no other options.
# Patrick has a current synced copy on his system.
# These people don't seem to appear in any commits. For whatever reason, we are missing hundreds of commits.
# Use this command to get a new list when we find our missing branches.
# git log --format "%aN" | sort -u
# johntmorris=John Morris <johntmorris@users.sourceforge.net>
# jimcool=Jakub MArsik <jimcool@users.sourceforge.net>
@ericf
ericf / gist:961730
Created May 8, 2011 22:12
A simple, small, and powerful CSS Grid System (based on YUI 3 CSS Grids)
/* Based on YUI 3 CSS Grids: http://developer.yahoo.com/yui/3/cssgrids/ */
.layout {
letter-spacing: -0.31em; /* webkit: collapse white-space between units */
*letter-spacing: normal; /* reset IE < 8 */
word-spacing: -0.43em; /* IE < 8 && gecko: collapse white-space between units */
}
.layout > *,
.layout .unit {
display: inline-block;
zoom: 1; *display: inline; /* IE < 8: fake inline-block */
@tclem
tclem / libgit2sharp.cs
Created March 28, 2011 16:18
API design thoughts for libgit2sharp
using (var repo = new Repository("path\to\repo.git"))
{
// Object lookup
var obj = repo.Lookup("sha");
var commit = repo.Lookup<Commit>("sha");
var tree = repo.Lookup<Tree>("sha");
var tag = repo.Lookup<Tag>("sha");
// Rev walking
foreach (var c in repo.Commits.Walk("sha")) { }
@mjball
mjball / stackExchangeDailyRep.user.js
Created February 14, 2011 14:51
Shows today's reputation score and time till new session begins. Originally written by Nick Craver, maintained by Matt Ball.
// ==UserScript==
// @name SE Show Today's Reputation
// @namespace SE_TODAY_REP
// @description Shows today's reputation score and time till new session begins. Written by Nick Craver, maintained by Matt Ball. http://meta.stackoverflow.com/questions/12053#57813
// @version 1.1
// @include http://stackoverflow.com/*
// @include http://serverfault.com/*
// @include http://superuser.com/*
// @include http://meta.stackoverflow.com/*
// @include http://*.stackexchange.com/*