Skip to content

Instantly share code, notes, and snippets.

View GottZ's full-sized avatar
🐝
The Bees Knees

Jan-Stefan Janetzky GottZ

🐝
The Bees Knees
View GitHub Profile
# how to block IE in nginx:
if ($http_user_agent ~* 'MSIE ([1-9]|10)\.') {
return 302 https://www.microsoft.com/en-us/WindowsForBusiness/End-of-IE-support;
}
@GottZ
GottZ / index.js
Created July 29, 2016 20:47
simple debounce in onoff (nodejs gpio module)
"use strict";
const Gpio = require("onoff").Gpio;
// some kind of debouncing wrapper for watch
Gpio.prototype.watchFilter = function (callback) {
const that = this;
if (!this.watchFilterData) {
@GottZ
GottZ / dps.sh
Last active April 7, 2025 15:56
/etc/profile.d/dps.sh
# Docker PS prettifier
# revision 6
# https://gist.github.com/GottZ/4a6c2af314d73cd8b71d
dps() {
docker ps $@ --format "table{{ .Image }}\\t{{ .Names }}\\t{{ .Status }}\\t{{ .Ports }}" | awk '
NR % 2 == 0 {
printf "\033[0m";
}
NR % 2 == 1 {