Skip to content

Instantly share code, notes, and snippets.


Oliver Gerlich oliver

View GitHub Profile
oliver /
Last active Dec 5, 2021 reimplements the getVerificationHash() method from Mozilla SearchUtils.jsm. uses that to modify the search engine entry.
#!/usr/bin/env python3
# Adjusts the metaData.hash value in the supplied search.json.mozlz4 file to match the supplied profile path value.
import io
import json
import mozlz4a
import os
oliver /
Last active Sep 1, 2020
Start Firefox with new profile
# Starts Firefox with a new temporary profile which is deleted when FF exits.
tempdir=$(mktemp -d --tmpdir firefox-priv.XXXXXX)
echo "$(date): starting Firefox with temporary profile at '$tempdir'"
cleanupOnExit ()
oliver /
Last active Dec 31, 2017
fetches video URLs from
#!/usr/bin/env python
# Downloads URLs for all talks of a conference from
# Prefers HD videos with many languages.
# Prints a list of URLs, for use eg. with wget -i .
import requests
oliver / gist:5ed673edc8521b63827b
Created Sep 21, 2014
[PATCH] change test to cover the original problem from rt-84767
View gist:5ed673edc8521b63827b
From 856ce484fc090725525e9781baab2fd02610400f Mon Sep 17 00:00:00 2001
From: Oliver Gerlich <>
Date: Sun, 21 Sep 2014 12:46:23 +0200
Subject: [PATCH] change test to cover the original problem from rt-84767
t/rt-84767.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/rt-84767.t b/t/rt-84767.t
oliver /
Created Apr 14, 2014
create an animation showing Discrete Cosine Transform and what its frequency levels look like
import sys, os
from PIL import Image
import numpy
import scipy.fftpack
sourceImage = sys.argv[1]
image =
View mgedit
# Start Gedit in new process (by setting TMPDIR to different value)
export TMPDIR=/tmp/mgedit/
mkdir -p $TMPDIR
NEWTMPDIR=`mktemp -d -t mgedit.XXXXXXXXXX` || exit 1
/usr/bin/gedit $@ &> $TMPDIR/gedit.log