Skip to content

Instantly share code, notes, and snippets.

View ewpratten's full-sized avatar

Evan Pratten ewpratten

View GitHub Profile
# Set up Huion tablet
xsetwacom --set "Tablet Monitor Pad pad" Button 1 "key +ctrl +z -z -ctrl"
xsetwacom --set "Tablet Monitor Pad pad" Button 2 "key +ctrl +tab -tab -ctrl"
xsetwacom --set "Tablet Monitor Pad pad" Button 8 "key shift"
xsetwacom --set "Tablet Monitor Pad pad" Button 9 "key ctrl"
xsetwacom --set "Tablet Monitor Pad pad" Button 10 "key 1"
xsetwacom --set "Tablet Monitor Pad pad" Button 11 "key 3"
xsetwacom --set "Tablet Monitor Pad pad" Button 12 "key 0"

Bootstraping remote servers with my personal configs

Installing ZSH

# With wget
sh -c "$(wget -O- https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
# With curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)"
@ewpratten
ewpratten / SHERNET.hosts
Created December 8, 2021 18:30
Sheridan College SHERNET reverse DNS hosts table
# THIS FILE WAS AUTOMATICALLY GENERATED
#
# This is the full reverse DNS hosts table for SHERNET (AS5664)
# The data contained in this file was obtained from various public sources
#
# Please use with care :)
142.55.0.1 mi-a303-border-be99.internal
142.55.0.2 mi-a303-fw-outside.internal
142.55.0.5 oa-pim-rp.internal
@ewpratten
ewpratten / wireguard-genkey
Last active November 20, 2021 23:35
Generate and print a wireguard keypair
#! /bin/bash
set -e
KEY=$(wg genkey); echo "priv: $KEY"; echo "pub: $(echo $KEY | wg pubkey)"
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
const float maxOpacity = 0.25;
const float zoom = 0.75;
const int spacing = 1;
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec3 col = vec3(1) - (vec3(max(cos(fragCoord.x * zoom) + cos(fragCoord.y * zoom) - 1.0, 0.0)) * maxOpacity);
fragColor = vec4(col,1.0);
}
@ewpratten
ewpratten / startampr.sh
Created September 29, 2021 16:07
startampr.sh for 44.63.7.32/29
#!/bin/sh
# KB9MWR 07/2019 amprnet routing including rules.
# Uses ampr-ripd 1.16.3 by Marius, YO2LOJ
# Further explained at:
# http://www.qsl.net/kb9mwr/wapr/tcpip/ampr-ripd.html
##################################################################
### ENABLE IP FORWARDING ###
sysctl -w net.ipv4.ip_forward=1
########################################
### ENABLE IPIP TUNNEL INTERFACE tunl0 ###
// Viewport dimensions
const vec2 viewport = vec2(1080.0, 720.0);
// Pixel scaling
const vec2 pixelScale = vec2(2.0, 2.0);
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Calculate the distance to merge pixels

Converting ITTY to a text stream

1. consume ITTY

mkfifo fifo.wav
curl http://internet-tty.net:8000/ITTY --output - | ffmpeg -i pipe:0 -f wav -ar 11025 pipe:1 > fifo.wav

2. Decode RTTY data to a file

{
"basics": {
"name": "John Doe",
"label": "Programmer",
"picture": "",
"email": "john@gmail.com",
"phone": "(912) 555-4321",
"website": "http://johndoe.com",
"summary": "A summary of John Doe...",