Skip to content

Instantly share code, notes, and snippets.

View wdullaer's full-sized avatar


View GitHub Profile

Keybase proof

I hereby claim:

  • I am wdullaer on github.
  • I am wdullaer ( on keybase.
  • I have a public key ASDhhLdKJQA77jQA0r6XHyUhDt7pMtq5WN9LGZGYji4QXQo

To claim this, I am signing this object:

wdullaer /
Last active March 21, 2021 05:27
Useful git scripts / onelines
# Checkout remote branch to new local branch
git checkout -b newbranch remotename/remotebranch
# Reset a file to a version from a few commits ago
BASE_REV=$(git merge-base old-branch current-branch)
git filter-branch --tree-filter "git checkout ${BASE_REV} -- path-to-restore" old-branch..current-branch
wdullaer / bunyan-log.clj
Created February 5, 2018 15:15
A bunyan configuration for the Clojure Timbre logger
(ns wdullaer.bunyan-log
(:require [ :as json]
[clojure.string :as string]
[taoensso.timbre :as log]))
(def bunyan-levels
"Maps a logging level keyword into a bunyan integer level"
{:trace 10
:debug 20
:info 30
wdullaer /
Last active July 12, 2017 16:37
Expose docker socket over unsecure TCP with systemd
mkdir -p /etc/systemd/system/docker.service.d
cat <<EOF > /etc/systemd/system/docker.service.d/override.conf
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://
sudo systemctl daemon-reload
sudo service docker restart
wdullaer /
Last active March 24, 2023 07:58 — forked from pylover/
#! /usr/bin/env python3.5
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
This version is adapted to work on ubuntu 16.10
Workaround for bug:
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
wdullaer / batman.js
Last active December 5, 2016 10:31
(''+(+'⇹')).repeat(8) + ' BATMAN!'
wdullaer / bubbleupnpserver.service
Created May 26, 2015 18:20
BubbleUPnP Server Systemd Unit
Description=BubbleUPnP Server
wdullaer / syntax.css
Created April 25, 2015 17:23
Monokai Syntax CSS theme
/* Adjusted to give override background and text colour */
.highlight pre, pre, .highlight .hll {
background-color: #49483E;
border: 1px solid #ccc;
padding: 6px 10px;
border-radius: 3px;
color: #FFFFFF;
.gist pre {
wdullaer / Monokai.colorscheme
Last active March 21, 2022 20:43
Monokai Konsole Colourscheme
wdullaer / docker-cleanup
Last active August 17, 2023 14:17
Cleanup unused Docker images and containers
# Cleanup docker files: untagged containers and images.
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref:
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'