Skip to content

Instantly share code, notes, and snippets.

Avatar
🦊
GitLab

Michael Friedrich dnsmichi

🦊
GitLab
View GitHub Profile
@devonzuegel
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:
* https://github.com/devonzuegel/digital-nesting/blob/master/zoom.js
*/
@lazyfrosch
lazyfrosch / git-filter-secrets
Last active Jan 8, 2020
An example how to filter secrets from git commits
View git-filter-secrets
#!/bin/bash
set -e
case "$1" in
init)
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
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: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@sw-yx
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;
init();
animate();
addShapes();
render();
function addShapes() {
@skyzyx
skyzyx / homebrew-gnubin.md
Last active Oct 15, 2021
Using GNU command line tools in macOS instead of FreeBSD tools
View homebrew-gnubin.md

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

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
waja / stretch2buster.sh
Last active Oct 12, 2021
Migration from Debian Stretch to Buster
View stretch2buster.sh
Please also refer to http://www.debian.org/releases/buster/releasenotes 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 https://stbuehler.de/blog/article/2017/06/28/debian_stretch__upgrade_32-bit_to_64-bit.html?"
# 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 (http://www.debian.org/releases/buster/amd64/release-notes/ap-old-stuff.en.html#switch-utf8)
dpkg-reconfigure locales
@jmb
jmb / README.md
Last active Jan 27, 2019
MQTT Data Subscriber for Dashing
View README.md

Description

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: