Skip to content

Instantly share code, notes, and snippets.


Michael Friedrich dnsmichi

View GitHub Profile
devonzuegel / close-zoom-tab-on-success.js
Last active May 24, 2020
Close Zoom tab on success — TamperMonkey
View close-zoom-tab-on-success.js
/* This has moved to:
lazyfrosch / git-filter-secrets
Last active Jan 8, 2020
An example how to filter secrets from git commits
View git-filter-secrets
set -e
case "$1" in
git config filter.git-filter-secrets.smudge "git-filter-secrets smudge"
git config filter.git-filter-secrets.clean "git-filter-secrets clean"
git config filter.git-filter-secrets.required true
echo "Configuration updated"
IanColdwater / twittermute.txt
Last active Oct 15, 2021
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
sw-yx / cities.js
Last active Sep 16, 2019
threejs boilerplate
View cities.js
let renderer, camera, controls, scene,
width = window.innerWidth,
height = window.innerHeight;
function addShapes() {
skyzyx /
Last active Oct 15, 2021
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.


Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

waja /
Last active Oct 12, 2021
Migration from Debian Stretch to Buster
Please also refer to and use your brain! If you can’t figure out what one of the commands below does, this is not for you. Expert mode only :)
# Crossgrading ?!?
[ "$(dpkg --print-architecture)" == "i386" ] && echo "How about crossgrading to amd64 as described in"
# Since running buster with older kernels may not work well (eg jessie kernels) lets see if we have a domU without own kernel
if [ -d /sys/module/xen_netfront -a $(dpkg -l | grep grub-xen-bin | wc -l) = 0 -a $(dpkg -l | grep linux-image | wc -l) = 0 ]; then echo "Please run 'apt install grub-xen-bin grub-xen linux-image-amd64 && update-grub' to install a recent kernel and boot your domU with it next time"; fi
# upgrade to UTF-8 locales (
dpkg-reconfigure locales
jmb /
Last active Jan 27, 2019
MQTT Data Subscriber for Dashing


Dashing job to subscribe to MQTT messages.

MQTT is a lightweight publish/subscribe messaging transport. This job allows Dashing to subscribe to these messages and send them as events. There is no associated widget as the data can take any form - commonly numbers, but not necessarily. The script as laid out below sends events with value, current (the same contents) and last values so can be plugged directly into the Numbers or Meter widgets using the data-id in the dashboard file. The send_event could easily be modified if required.

Set up

Add to Gemfile: