Skip to content

Instantly share code, notes, and snippets.

@DylanJones
DylanJones / out.md
Last active November 14, 2022 00:24
hangman but worse

`['fighting wars', 'fatality rate', 'killings have', 'murdered four', 'murdered last', 'believed dead', 'declared dead', 'dropping dead', 'presumed dead', 'reported dead', 'standing dead', 'thousand dead', 'disaster area', 'disaster plan', 'disaster site', 'disaster will', 'disaster zone', 'negative bias', 'violence does', 'violence have', 'violence here', 'violence last', 'violence must', 'violence over', 'violence unit', 'violence will', 'crushing debt', 'negative body', 'negative cash', 'negative film', 'negative life', 'negative mood', 'negative news', 'negative ones', 'negative peer', 'negative role', 'negative side', 'negative sign', 'negative test', 'negative tone', 'negative view', 'negative vote', 'negative ways', 'stealing cars', 'stealing food', 'virulent form', 'colonial wars', 'regional wars', 'tortured soul', 'physical harm', 'possible harm', 'pressure loss', 'suffered less', 'stealing more', 'casualty list', 'casualty rate', 'criminal acts', 'criminal case', 'criminal code', 'criminal gang', 'c

@DylanJones
DylanJones / fluidsim.glsl
Last active March 1, 2022 21:40
GLSL Fluid Simulation
// #version 300 es
#define SHADERTOY
// In order to get this to work on Shader Editor, comment out the SHADERTOY define
// and comment in the #version tag.
/********** SHADERTOY COMPAT ***********/
// Shadertoy uses different input names from Shader Editor.
#ifdef SHADERTOY
#define resolution iResolution
@DylanJones
DylanJones / midi_parser.py
Last active September 8, 2020 01:23
MIDI to minecraft shulker boxes converter
import mido
import math
import os
import argparse
import time
import json
def format_note(note):
"""
Given a numeric note number, format it as a Letter(#) Octave string.
@DylanJones
DylanJones / bad.rs
Created December 22, 2019 00:03
i am bad at rust
use std::process;
use std::io;
fn main() {
let server_process = match process::Command::new("bash")
.arg("-c")
.arg("for i in 1 2 3 4 5 6 7 8 9; do echo hello; sleep 1; done")
.stdout(process::Stdio::piped())
.stdin(process::Stdio::piped())
.spawn() {
@DylanJones
DylanJones / annoy-a-tron-2.ino
Last active August 5, 2019 04:39
Annoy-a-tron code but for an arduino
/*
* speaker_pcm
*
* Plays 8-bit PCM audio on pin 11 using pulse-width modulation (PWM).
* For Arduino with Atmega168 at 16 MHz.
*
* Uses two timers. The first changes the sample value 8000 times a second.
* The second holds pin 11 high for 0-255 ticks out of a 256-tick cycle,
* depending on sample value. The second timer repeats 62500 times per second
* (16000000 / 256), much faster than the playback rate (8000 Hz), so
{
"state": "undersized+degraded+peered",
"snap_trimq": "[]",
"snap_trimq_len": 0,
"epoch": 3752,
"up": [
3
],
"acting": [
3