Skip to content

Instantly share code, notes, and snippets.

@simonswine
simonswine / submodule2subtree.py
Created April 13, 2014 09:07
Integrate existing submodules as subtree
#!/usr/bin/env python
from __future__ import print_function
from git import Repo
import sys
import os
import shutil
def convert_submodule_to_subtree(r, sm, squash=True):
@simonswine
simonswine / id_former03_vagrant.pub
Created March 27, 2014 13:32
id_former03_vagrant.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3Oz43/FDedO6lXNZttRV/cD0y8taDTnGTGjCF+71NHofdwgJugk17pxSqiE3prPt2T5VfkoO5ol+r8fsSP2qAe8Fz02AdcULb+Z8PrPeMnkp35dkNeQwnnwFknROh/3gQsmFFgZQNDInkI1IYgZAJuD+vqiRtNzT6MGjExT2kaaj/XxadaC4vm+AAh4KT/9m4AXpednGaOaMuu++7BRuNdFFO75ouI41KSl7cATvOzsKjUoHZncS23EAT9Ad7i51TFZ3EB/nBdaNwiNaKxJGU/kMPWtjKT1SnPR8gzz0/DMLhhQE5I2wjamA9IUXLfcyPDaozDVxm6JoxIL5FjlV6K9ML4hBwvSdOYwxXGYdGO1l+3Uou4X1ZNYxGVMHaBroqxKIoXi9LJGLjbsfJKbS5SqAmknCxhpev8cAw1hZz32dh8hnhktA2eaYUWIZA20/vt6ERmWejRruJ3URrQHzgI1v/ZqDzx26XBJ+Fbtn89RYcfDhDuYgYAF5tfDjLHBMowV7dlICLMi8VfLV2NAsnW4TCBI3z8rL63yOGQ/4J2kIrvreUczDYro9RocOHlABhKI0UesrbT3JOf59/aIwRGY+88H2jbD5RGbjYRESXmAoIHmh9519AR5QAo8n+TqitDbzUycz99+nKsN14QwkAQZStf2HEtBq6blo1TxFHqw== christian@pc-christian
@simonswine
simonswine / gist:6429538
Created September 3, 2013 21:02
Remove all config files of uninstalled packages
$ sudo dpkg --purge $(dpkg -l | grep ^rc | awk '{print $2}' | tr "\n" " ")
@simonswine
simonswine / jenkins-latex.sh
Created August 6, 2013 05:59
Build script for building latex docs via jenkins in a cow chroot. (Pretty sure this isn't very secure, as anyone who has access to the git/svn/vcs can break out of chroot as root)
#!/bin/bash
# Clean up
rm -f *.pdf
cd source
# Entferne altes nicht gitiges
git clean -fx
cd $WORKSPACE
# Latex Base Builder erstellen
@simonswine
simonswine / gist:5728575
Created June 7, 2013 11:10
Upgrade deploy key Gitlab 5.1 -> 5.2
#!/usr/bin/env python
import MySQLdb
import MySQLdb.cursors
sql = MySQLdb.connect(host="xyz", user="abc",passwd="def",db="f03_gitlab_production",cursorclass=MySQLdb.cursors.DictCursor)