Skip to content

Instantly share code, notes, and snippets.

View schollz's full-sized avatar
🎺

Zack schollz

🎺
View GitHub Profile
@dopey
dopey / main.go
Last active September 27, 2025 17:07 — forked from denisbrodbeck/main.go
How to generate secure random strings in golang with crypto/rand.
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"io"
"math/big"
)
@kymckay
kymckay / perlin.lua
Last active April 30, 2025 20:59
Perlin Noise in Lua
--[[
Implemented as described here:
http://flafla2.github.io/2014/08/09/perlinnoise.html
]]--
perlin = {}
perlin.p = {}
-- Hash lookup table as defined by Ken Perlin
-- This is a randomly arranged array of all numbers from 0-255 inclusive
@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
@hit0ri
hit0ri / chanhopper.sh
Last active August 8, 2018 14:26
Wi-Fi channel hopper
#!/bin/bash
msg() {
printf -- '%s\n' "$@"
}
err() {
printf -- 'error: %s\n' "$@" >&2
exit 1
}
Routine {
s = Server.default;
s.waitForBoot;
// max buffer duration
~dur = 8.0;
// 4-channel buffer: pitch, clar, amp, flatness
~buf = Buffer.alloc(s, s.sampleRate * ~dur, 4);
@audionerd
audionerd / supersaw-shooter.scd
Last active May 5, 2025 17:33
SuperSaw (Roland JP-8000 and JP-8080) in SuperCollider
// via https://web.archive.org/web/20191104212834/https://www.nada.kth.se/utbildning/grukth/exjobb/rapportlistor/2010/rapporter10/szabo_adam_10131.pdf
(
{ | freq = 523.3572, mix=0.75, detune = 0.75 |
var detuneCurve = { |x|
(10028.7312891634*x.pow(11)) -
(50818.8652045924*x.pow(10)) +
(111363.4808729368*x.pow(9)) -
(138150.6761080548*x.pow(8)) +
(106649.6679158292*x.pow(7)) -
@furenku
furenku / audioSynths.scd
Created April 25, 2019 05:09
INSTRUMENT SynthDefs
SynthDef(\audioBus, {|inBus=99,outBus=99,amp=1,pan=0|
var sig = In.ar(inBus);
Out.ar(outBus, Pan2.ar(sig * amp,pan))
}).store;
SynthDef(\audioInput, {| inBus=0, out = 0, gate=1,amp=1|
@karnpapon
karnpapon / againagain.scd
Last active May 24, 2022 12:36
Cadson Demak - again_again(TBC-interpretation)
/////////////////////////////////////////////////////////////////////////////////////////
************************************** INITIALIZE ***************************************
/////////////////////////////////////////////////////////////////////////////////////////
Server.default.options.outDevice = "Built-in Output";
s.options.numBuffers = 2048 * 16;
s.options.memSize = 8192 * 16;
s.options.maxNodes = 1024 * 32;
// s.options.numOutputBusChannels = 12;
s.options.numInputBusChannels = 0;
@dndrks
dndrks / pattern_time-study.lua
Created March 29, 2020 22:22
pattern time study
-- pattern_time study
pattern_time = require 'pattern_time' -- use the pattern_time lib in this script
function init()
grid_pattern = pattern_time.new() -- establish a pattern recorder
grid_pattern.process = grid_pattern_execute -- assign the function to be executed when the pattern plays back
grid_redraw()
end
@madskjeldgaard
madskjeldgaard / raspiaudiotune.sh
Last active February 1, 2024 12:28
Tune Raspberry Pi for audio
#!/usr/bin/env sh
# Install utils for cpu freq
sudo apt-get install cpufrequtils
sudo cpufreq-set -r -g performance
sudo echo "ENABLE="true"
GOVERNOR="performance"
MAX_SPEED="0"
MIN_SPEED="0" " | sudo tee -a /etc/default/cpufrequtils