Skip to content

Instantly share code, notes, and snippets.

View SpotlightKid's full-sized avatar

Christopher Arndt SpotlightKid

View GitHub Profile
@Michal-Szczepaniak
Michal-Szczepaniak / client.nim
Created October 20, 2021 18:17
Nim async UDP server discovery and TCP server connection
import asyncnet, asyncdispatch, nativesockets
proc discover(): Future[string] {.async.} =
let socket = newAsyncSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
socket.setSockOpt(OptReuseAddr, true)
socket.setSockOpt(OptReusePort, true)
socket.setSockOpt(OptBroadcast, true)
await socket.sendTo("255.255.255.255", Port(12346), $0b10)
var data = await socket.recvFrom(15)
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
<head>
<title><xsl:value-of select="/rss/channel/title"/> RSS Feed</title>
<meta charset="UTF-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
<meta http-equiv="content-language" content="en_US" />
@mxmilkiib
mxmilkiib / lv2-over1200-uri-list
Last active April 17, 2024 23:16
Over 1200 LV2 plugins. Almost all are available in the AUR for Arch Linux/Manjaro/pacman distributions. Note URIs are normally only used internally in hosts.
# IFS=$'\n' arr=($(lv2ls)) && IFS=$'\n' arr2=($(lv2ls -n)) && for (( i=0; i<${#arr[*]}; ++i)); do printf "%s|%s\n" "${arr[$i]}" "${arr2[$i]}"; done | column -t -s "|"
file:///usr/lib/lv2/audio_to_audio.ingen/main.ttl audio_to_audio
file:///usr/lib/lv2/control_to_control.ingen/main.ttl control_to_control
file:///usr/lib/lv2/cv_to_cv.ingen/main.ttl cv_to_cv
file:///usr/lib/lv2/event_to_event.ingen/main.ttl event_to_event
file:///usr/lib/lv2/gen_amsynth_filte_out.ingen/main.ttl gen_amsynth_filte_out
file:///usr/lib/lv2/MonoEffect.ingen/MonoEffect.ttl Ingen Mono Effect Template
file:///usr/lib/lv2/MonoInstrument.ingen/MonoInstrument.ttl Ingen Mono Instrument Template
file:///usr/lib/lv2/StereoEffect.ingen/StereoEffect.ttl Ingen Stereo Effect Template
file:///usr/lib/lv2/StereoInstrument.ingen/StereoInstrument.ttl
@arachsys
arachsys / README
Last active January 7, 2023 16:05
Obtaining a shell on Yamaha Montage
This content has moved to https://arachsys.github.io/montage/
declare name "StonePhaser";
declare author "JPC";
declare version "1.1";
declare license "CC0-1.0";
// Référence :
// Kiiski, R., Esqueda, F., & Välimäki, V. (2016).
// Time-variant gray-box modeling of a phaser pedal.
// In 19th International Conference on Digital Audio Effects (DAFx-16).
@ergoz
ergoz / nginx config for icecast2
Created January 7, 2019 01:47 — forked from highgain86j/nginx config for icecast2
nginx configuration for reverse-proxying icecast2 streaming server.
server {
listen 80;
listen [::]:80;
server_name radio.example.com;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
location / {
#!/usr/local/bin/dumb-init /bin/bash
set -euxo pipefail
VIDEO_URL=${VIDEO_URL:-$1}
ICECAST_URL=${ICECAST_URL:-$2}
ICECAST_DESC=${ICECAST_DESC:-Re-Stream of ${VIDEO_URL}}
ICECAST_NAME=${ICECAST_NAME:-Re-Stream}
ICECAST_WEBSITE=${ICECAST_WEBSITE:-$VIDEO_URL}
@illume
illume / flask_matplotlib.py
Last active September 21, 2022 02:14
Shows how to use flask and matplotlib together.
""" Shows how to use flask and matplotlib together.
Shows SVG, and png.
The SVG is easier to style with CSS, and hook JS events to in browser.
python3 -m venv venv
. ./venv/bin/activate
pip install flask matplotlib
python flask_matplotlib.py
"""
@shawwwn
shawwwn / uping.py
Last active March 31, 2024 18:12
µPing: Ping library for MicroPython
# µPing (MicroPing) for MicroPython
# copyright (c) 2018 Shawwwn <shawwwn1@gmail.com>
# License: MIT
# Internet Checksum Algorithm
# Author: Olav Morken
# https://github.com/olavmrk/python-ping/blob/master/ping.py
# @data: bytes
def checksum(data):
if len(data) & 0x1: # Odd number of bytes

DX7

image

Note: One of the algorithms is incorrect due to a missing operator. Need to update the image. Will have to get on that soon.

These are the original 32 algorithms as used in Yamaha DX7.

The later Yamaha FS1R and Yamaha SY77 may have compatibility with these algorithms, but that's beyond the current scope. The FS1R contains 88 algorithms, while the SY77 contains 45 algorithms.