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
@GottZ
GottZ / code.py
Last active April 26, 2023 11:15
little CircuitPython USB MIDI wrapper for the Adafruit Neo Trinkey SAMD21 USB. It forwards the touch inputs to control channels 1 and 2 and allows setting the LED's according to line
# for Adafruit Neo Trinkey SAMD21 USB https://www.adafruit.com/product/4870
# code is at: https://gist.github.com/GottZ/5e6477eccf36e6eda4f3ffa6b89d4e95
# revision 4
#
# touch pads will send control change events for 1 and 2 with 127 and 0 for their state
# when touching both at once, it will emit a control change event with id 3 additionally to 1 and 2
# if you want this with a delay, just remove # for all code lines that have been commented out
#
# the four neopixel LED's will respond to defined control change events as defined in the midipixels tuple
# 10, 20, 30 and 40 describe the led position. 10 is red, 11 is green, 12 is blue, 13 set's rgb to greyscale
# Colors (GottZ)
# https://gist.github.com/GottZ/addae78a1e38782035dd9a4ca6198b37
colors:
# Default colors
primary:
background: '0x282828'
foreground: '0xeeeeee'
# Normal colors
normal:
const sass = require('node-sass');
// related: https://github.com/UnwrittenFun/svelte-vscode/issues/1
module.exports = {
preprocess: {
style: async ({ content, attributes }) => {
if (!['text/sass', 'text/scss'].some(attributes.type) && !['sass', 'scss'].some(attributes.lang)) return;
return new Promise((resolve, reject) => {
@GottZ
GottZ / 000README.MD
Last active May 17, 2019 17:39 — forked from vRobM/Slack-Go-dARK.ps1
Make Slack Desktop for Windows have dARK mode using powershell.

this will patch slack desktop on windows into dark mode.

slightly hardened version of vRobM / Slack-Go-dARK.ps1

this simply injects this into slack and kills possible attack vectors.

simply download the batch file and the powershell script and run the .bat file with elevated permissions.
simply right click Slack-Go-dARK.bat and select run as administrator

voila, slack is now in dark mode when you start it.

@GottZ
GottZ / after.js
Last active July 7, 2018 14:37
¯\_(ツ)_/¯ ransomware in youtube-hd: https://github.com/james-fray/YouTube-HD/issues/10 backup can be found here: https://crx.dam.io/ext/akjbfncbadcmnkopckegnmjgihagponf.html this was taken from 3.1.2
'use strict';
/** @type {string} */
var c = "79";
/** @type {string} */
var ckey = "2YmmB6jnqhn9Fps4";
/** @type {!Array} */
var signatures = [];
/** @type {!Array} */
var signaturesBlockList = [];
var signaturesBlockListExpires = {};

Keybase proof

I hereby claim:

  • I am gottz on github.
  • I am gottz (https://keybase.io/gottz) on keybase.
  • I have a public key ASA4qJEuh10UzQJ3qR9JdNfsn8sycWscSQqYA-i3tzh7Sgo

To claim this, I am signing this object:

# 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 September 22, 2020 20:46
/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 {