Skip to content

Instantly share code, notes, and snippets.

View dm8tbr's full-sized avatar

Thomas B. Ruecker dm8tbr

View GitHub Profile
@katef
katef / cloud.vcl
Last active May 14, 2022 19:50
HTTP Moomin delivery
sub cloud_moomin {
set resp.http.moomin00 = " %1b[38;5;237m▄%1b[38;5;235m▄%1b[49m";
set resp.http.moomin01 = " %1b[38;5;237m▄%1b[48;5;237m%1b[38;5;249m▄%1b[38;5;236m▄%1b[49m %1b[48;5;239m%1b[38;5;16m▄%1b[48;5;237m%1b[38;5;253m▄%1b[38;5;247m▄%1b[48;5;234m%1b[38;5;16m▄%1b[49m";
set resp.http.moomin02 = " %1b[38;5;233m▄%1b[48;5;253m%1b[38;5;237m▄%1b[48;5;254m%1b[38;5;255m▄%1b[38;5;251m▄%1b[38;5;239m%1b[49m▄ %1b[38;5;237m▄ %1b[48;5;254m%1b[38;5;248m▄%1b[48;5;249m%1b[38;5;254m▄%1b[48;5;235m%1b[38;5;246m▄%1b[49m";
set resp.http.moomin03 = " %1b[38;5;235m▄%1b[48;5;250m%1b[38;5;242m▄%1b[48;5;231m %1b[48;5;247m%1b[38;5;231m▄%1b[48;5;252m▄%1b[48;5;253m▄%1b[48;5;254m▄%1b[48;5;253m▄%1b[48;5;249m▄%1b[48;5;188m▄%1b[48;5;245m%1b[38;5;251m▄%1b[49m";
set resp.http.moomin04 = "
@zoe1337
zoe1337 / mic-control.sh
Created April 4, 2020 01:20
A more advanced form of mute-unmute, with true PTT functionality
#!/usr/bin/env bash
## usage: after installation, microphone is unmuted only while you
## press the key specified here. shift+hotkey will lock the microphone state
## note that this only works consistently as long as you use this
## script and/or keybindings; it won't update state if you use pavucontrol
## or other method to mute/unmute.
##
## installation: ideally, just run this script from a terminal with the install parameter.
## if that fails for whatever reason, refer to
@mschmitt
mschmitt / doh.sh
Last active November 16, 2022 20:02
doh.sh - A highly non-scalable CGI DNS-over-HTTPS proxy in Bash. Have fun.
#!/bin/bash
# A highly non-scalable CGI DNS-over-HTTPS proxy in Bash. Have fun.
# Here's an endpoint running this script: https://doh.team-frickel.de
# Relevant Firefox settings:
# network.trr.mode = 2 -> DoH and fall back to DNS (default)
# network.trr.mode = 3 -> DoH only -> MUST use bootstrapAddress
# network.trr.uri = https://doh.team-frickel.de
@nivex
nivex / festival-hts.sh
Created March 28, 2019 16:39
AGI for high quality Festival TTS
#!/bin/bash
###
# AGI for high quality Festival TTS
# kjotte 2019-03-23
#
# The Asterisk built-in Festival application only operates at 8KHz.
# This script implements a 32KHz HTS voice.
#
# Sample invocation from dialplan:

old

$ /usr/sbin/dnssec-keygen -a HMAC-SHA512 -b 128 -n HOST example.org
Kexample.org.+165+46294

$ cat Kexample.org.+165+46294.key
example.org. IN KEY 512 3 165 ZKiFXX3Q3Nj7TALud8n0fQ==

# <insert: copy/paste all sorts of stuff>
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active May 4, 2024 15:47
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@cdgraff
cdgraff / gist:8578424
Last active September 25, 2023 23:53
logstash filter pattern for Icecast2
input {
file {
path => "/var/log/icecast/access.*"
type => "icecast"
start_position=>"beginning" # this be to import old logs
}
}
filter {
if [type] == "icecast" {
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs