Skip to content

Instantly share code, notes, and snippets.

View ChristianGaertner's full-sized avatar

Christian Gärtner ChristianGaertner

View GitHub Profile
anonymous
anonymous / gource-multiple-repositories.sh
Created March 24, 2011 01:10
Generates gource video out of multiple repositories.
#!/usr/bin/env bash
# Generates gource video (h.264) out of multiple repositories.
# Pass the repositories in command line arguments.
# Example:
# <this.sh> /path/to/repo1 /path/to/repo2
i=0
for repo in $*; do
# 1. Generate a Gource custom log files for each repo. This can be facilitated by the --output-custom-log FILE option of Gource as of 0.29:
logfile="$(mktemp /tmp/gource.XXXXXX)"
@rowan-m
rowan-m / make-history.sh
Created November 20, 2012 14:47
Turn lolcommits into a video slideshow set to music
#! /bin/bash
# Where lolcommits stores its images
LOLCOMMITS_DIR=/home/rowan/.lolcommits
# The subdirectory in the lolcommits directory you want to us
LOLCOMMITS_REPO=project
# Image mask used to blur commit message
BLUR_MASK_IMG=/home/rowan/mask.jpg
# Video frames per second
VIDEO_FPS=4
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@lrettig
lrettig / auth.py
Last active February 7, 2016 10:17
import facebook
from flask.ext.security.decorators import anonymous_user_required
from flask.ext.social.utils import get_provider_or_404
from flask.ext.social.views import _security, login_handler
@app.route('/login_social/<provider_id>', methods=['GET', 'POST'])
@anonymous_user_required
def login_social(provider_id=None):
"""
Login via credentials from a social network. For now only supports