Skip to content

Instantly share code, notes, and snippets.


Andrew Belt AndrewBelt

  • VCV
  • Tennessee, USA
View GitHub Profile
AndrewBelt / discord.cpp
Created August 20, 2021 22:22
Discord activity updater
View discord.cpp
#if defined ARCH_LIN || defined ARCH_MAC
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#if defined ARCH_WIN
#include <fcntl.h>
View benchmark.cpp
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdint>
#include <algorithm>
#include <time.h>
double getTime() {
struct timespec ts;
View Better Windows

Configuring Windows 10 with better privacy, performance, control, and fewer annoyances

As a reasonable computer user, I expect my operating system to not:

  1. send telemetry without my consent. Windows sends Microsoft a massive amount of personal data. [1] [2] [3] [4]
  2. update without my consent. Auto-updating is equivalent to a third-party being able to execute code remotely on my machine where I store private data. Even if an update is not malicious, updates change functionality, and I only want software to change if I know what will change and decide that I want it.
  3. tell me what I can or can't run on my computer. Apple does this w
# Converts an 8-bit RGB PNG to a 16-bit WAV wavetable bank.
# The brightness of the pixel at (x, y) converts to the value of sample x in bank y.
import sys
import os
import numpy as np
import imageio
path = sys.argv[1]
# Audible Instruments Patch File Updater
# Migrates VCV patches from AudibleInstrumentsPreview to AudibleInstruments in bulk
# usage:
# python path/to/patches/*.vcv
import sys
import json
AndrewBelt /
Created May 30, 2018 01:24
Convert C++ headers to boilerplate source files
import sys
import re
import os
header_filename = sys.argv[1]
if not header_filename:
raise "No filename given"
AndrewBelt /
Created January 2, 2018 22:10
Merges multiple ZIP files into a single ZIP
TMP_DIR=$(mktemp -d)
# Unzip each input ZIP
for IN_NAME in $IN_NAMES; do
unzip -n "$IN_NAME" -d "$TMP_DIR"
AndrewBelt /
Created November 1, 2017 08:30
for exporting SVG panels to VCV plugin source files
# for exporting SVG panels to VCV plugin source files
# Version: 1
# Support contact email: /dev/null
# License: CC0
import sys
import os
import re
# alias alphabet
alias a='aunpack' # extract many archive formats avoiding tarbombs
alias c='printf "\ec"' # clear the screen (also Ctrl-L)
alias f='feh -FZ' # view images fullscreen
alias g='grep -ER' # extended recursive grep
alias i='curl' # prints IP address
alias l='ls -lh' # detailed ls
alias m='make -j2' # recursive make (adjust to number of cores)
alias p='xclip -selection clipboard -o' # print clipboard
alias r='vim -R' # read-only vim
# pls + gib
# "Securely" transfer files between two computers, assuming the receiver has an accessible IP address
# Instructions:
# Add this to your .bashrc, and restart your terminal.
# Example session
# on receiver's terminal: