Skip to content

Instantly share code, notes, and snippets.

View iomonad's full-sized avatar
🍋
λ

iomonad iomonad

🍋
λ
  • Lutetia Parisiorum
View GitHub Profile
@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):
@iomonad
iomonad / images.clj
Created July 15, 2023 09:52
Compress Image in Pure Clojure
(ns arkana.lib.images
"Image manipulation namespace, provides some
utilities to compress & deal with images formats"
(:import java.io.File
java.io.FileOutputStream
javax.imageio.ImageIO
javax.imageio.IIOImage
javax.imageio.ImageWriteParam
java.awt.image.BufferedImage)
(:require [clojure.java.io :as io]))
@iomonad
iomonad / octal_x86.txt
Created May 15, 2023 08:14 — forked from seanjensengrey/octal_x86.txt
x86 is an octal machine
# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt
From: mark@omnifest.uwm.edu (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@iomonad
iomonad / sortable.cljs
Created December 19, 2022 14:55 — forked from p4ulcristian/gist:95aa7b28e3568a1d3e45d27807859baf
@dnd-kit/sortable with drag overlay (clojurescript reagent)
(ns swordfish.sortable
(:require [reagent.core :as r]
["react" :as react]
["@dnd-kit/core" :refer [DndContext
closestCenter
KeyboardSensor
PointerSensor
TouchSensor
DragOverlay
useSensor