Skip to content

Instantly share code, notes, and snippets.

@iomonad
iomonad / YamahaFM.md
Created October 31, 2024 09:37 — forked from bryc/YamahaFM.md
Collecting info on Yamaha FM soundchips
import serial
BUSPIRATE_PORT = '/dev/ttyUSB0'
SETUP_SEQUENCE = [
# '#', # reset bus pirate (slow, maybe not needed)
'm', # change mode (goal is to get away from HiZ)
'3', # UART MODE
'9', # Port Speed 115200
'1', # Parity (NO)
#include <stdio.h>
#include <stdint.h>
// Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc
uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo
{
while(len--)
{
crc ^= *buffer++ << 8;
int bits = 0;
do
@iomonad
iomonad / mindmap.md
Last active June 19, 2024 15:59
Mermaid Mind Map
mindmap
  root((mindmap))
    Origins
      Long history
      ::icon(fa fa-book)
      Popularisation
        British popular psychology author Tony Buzan
    Research
 On effectivenessand features
@iomonad
iomonad / test.md
Last active June 19, 2024 15:59
Mermaid Test Graph
---
config:
  sankey:
    showValues: false
---
sankey-beta

Agricultural 'waste',Bio-conversion,124.729
Bio-conversion,Liquid,0.597
@iomonad
iomonad / Makefile
Last active May 31, 2024 09:22
ESP32_RELAY_X1 over BLE
build:
arduino-cli compile -v -p /dev/ttyUSB0 --fqbn esp32:esp32:esp32
flash:
arduino-cli compile -v -p /dev/ttyUSB0 --fqbn esp32:esp32:esp32 -u
setup:
arduino-cli core install esp32:esp32
@iomonad
iomonad / flipper2proxmark.sh
Created May 29, 2024 07:57
Flipper Zero NFC file to Proxmark3 binary file converter
#!/bin/zsh
# Convert Flipper's NFC file to Proxmark3 compatible file
set -eu
if ! [ $# -eq 2 ]
then
echo "usage: $0 <input.nfc> <output.bin>"
exit 1
fi
@iomonad
iomonad / monochrome.clj
Created April 13, 2024 10:26
Convert Monochrome PNG image to boolean Matrix in Clojure
(ns user
(:require [clojure.java.io :as io]
[clojure.core.match :as m])
(:import java.awt.Color
java.awt.image.BufferedImage
javax.imageio.ImageIO))
(defn interpolate-colors
[^Color color & {:keys [lint?] :or {lint? true}}]
(m/match [(.getRed color) (.getGreen color) (.getBlue color)]
// e2271467ad3ecc2a716aef5872c785bbc5d7ce6af0b535a6d82f4fb29e388b35
#include <stdio.h>
#include <stdint.h>
#define MAGIC_TABLE_SIZE 192
#define KEY_LENGTH 6
#define UID_LENGTH 4
int main(int argc, char *argv[]) {
@iomonad
iomonad / install-arch-linux-rpi-zero-w.sh
Created July 18, 2023 13:55 — forked from larsch/install-arch-linux-rpi-zero-w.sh
Install Arch Linux ARM for Raspberry Pi Zero W on SD Card (with commands to configure WiFi before first boot).
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):