Skip to content

Instantly share code, notes, and snippets.

miebach / git-log-pretty
Last active Jun 3, 2021
pretty git log graph with coloured branches
View git-log-pretty
# Visualizing branch topology in git on the commandline
git log --graph --oneline --full-history --all
git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"
# With colors in Bash:
git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
miebach /
Created Oct 16, 2011
Python debugging and inspection: print (or return as string) a nicely formatted overview of a python object. Works on a module, class or instance.
# from
# created by (C) Philip Kromer
# forked as
# licence = psf
# On python attributes and methods read:
from cStringIO import StringIO
import sys
miebach /
Last active Mar 28, 2021
xenmigrate - convert a Citrix *.xva file to a XEN *.img file.
Original Location:
Quote from the Documentation: :
'The file formats of the commercial and open source Xen are totally different.
The open source is a standard image file, you can mount it, fdisk it, whatever you would like.
The Citrix Xen Virtual Appliance .XVA file is quite different. It is actually a tar file
with ova.xml meta data and directories starting with Ref full of 1M files that make up the
rive volumes of the virtual image.
miebach / rotate-a-wb-page-javascript.rst
Last active Sep 22, 2020
Rotate a web page 90 degree counter clockwise:
View rotate-a-wb-page-javascript.rst

Rotate a web page 90 degree counter clockwise


javascript: document.body.setAttribute( "style", "-webkit-transform: rotate(-90deg);");

paste into JS console: Ctrl-Shift-C -> "Console" from top menu

View post-checkout
#!/usr/bin/env bash
# gist at
# save this file to .git/hooks/post-checkout
# and also to .git/hooks/post-merge
# and make it executable
# Delete .pyc files and empty directories from root of project
cd ./$(git rev-parse --show-cdup)
miebach /
Last active Jan 4, 2016
Firefox extensions and settings


Options - Gerneral - Browsing

  smooth scrolling
x hardware acceleration
  check spelling
View py3.patch
diff -r 961ac99baa29 couchdb/
--- a/couchdb/ Sun Aug 18 18:41:46 2013 +0200
+++ b/couchdb/ Fri Jan 17 11:03:56 2014 +0100
@@ -13,9 +13,9 @@
>>> doc_id, doc_rev ={'type': 'Person', 'name': 'John Doe'})
>>> doc = db[doc_id]
>>> doc['type']
>>> doc['name']
miebach /
Created Jan 11, 2014
Xmind on Ubuntu 13.10 with workaround for missing menus
miebach / byobu hostname display
Last active Jan 1, 2016
Byobu's hostname script modified to show only the short hostname. Use the install script below and activate using F9 -> toggle -> hostname
View byobu hostname display
#!/bin/sh -e
# hostname: report a host's name
# Copyright (C) 2008-2011 Canonical Ltd.
# Copyright (C) 2011 Dustin Kirkland
# Authors: Dustin Kirkland <>
# This program is free software: you can redistribute it and/or modify
miebach / vSphere-Client-english.cmd
Created Dec 4, 2013
Start vSphere Client 5.x with english locale set:
View vSphere-Client-english.cmd
rem Start vSphere Client 5.x with english locale set:
rem see
"C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient.exe" -locale en_US