Skip to content

Instantly share code, notes, and snippets.

View amake's full-sized avatar
🌵

Aaron Madlon-Kay amake

🌵
View GitHub Profile
@amake
amake / run
Last active July 1, 2023 01:31
CLI tool-installing wrapper
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 <tool> [args...]"
exit 1
fi
tool="$1"
shift
;; Please create a Gist with the contents of this buffer.
;; MAKE SURE TO REMOVE ANY SENSITIVE INFORMATION FIRST
(:emacs-version "GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.3.0)\n of 2023-03-09" :prettier-el-version "1.3.0" :buffer-file-name nil :remote-id nil :major-mode messages-buffer-mode :exec-path
("/Users/aaron.madlon.kay/.nvm/versions/node/v14.21.2/bin/" "/Users/aaron.madlon.kay/.rbenv/shims/" "/Users/aaron.madlon.kay/.gem/ruby/2.6.0/bin/" "/Applications/flutter/bin/" "/Users/aaron.madlon.kay/.pub-cache/bin/" "/Users/aaron.madlon.kay/bin/" "/Users/aaron.madlon.kay/.local/bin/" "/opt/local/bin/" "/opt/local/sbin/" "/usr/local/bin/" "/System/Cryptexes/App/usr/bin/" "/usr/bin/" "/bin/" "/usr/sbin/" "/sbin/" "/opt/X11/bin/" "/Library/Apple/usr/bin/" "/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin/" "/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin/" "/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin/" "
@amake
amake / markov.py
Last active January 19, 2023 06:10
Markov text generator
"""Markov Chain-driven text generator. Suitable for use with e.g.
tinyshakespeare:
https://github.com/karpathy/char-rnn/blob/master/data/tinyshakespeare/input.txt
Invoke with input text file and chain order:
python markov.py input.txt 5
"""
import sys
import re
@amake
amake / Xcode 14.1 (iOS 16.1) fonts
Last active December 18, 2022 02:24
iOS 16.2 Runic codepoint investigation
/Users/amake/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Fonts
├── AppFonts
│   ├── AcademyEngraved.ttf
│   ├── AlNile.ttc
│   ├── AppleGothic.otf
│   ├── Athelas.ttc
│   ├── AvenirNextCondensed.ttc
│   ├── Bodoni-Ornaments.ttf
│   ├── Bodoni72-Book-SmallCaps.ttf
│   ├── Bodoni72-OldStyle.ttc
@amake
amake / unravel.rb
Last active March 6, 2022 09:13
Unravel IDS data
# unravel.rb
#
# Expand entries in ids.txt
# (https://github.com/cjkvi/cjkvi-ids/blob/master/ids.txt) to make fully
# "unraveled" decompositions.
#
# Usage: ruby unravel.rb ids.txt
#
# Note that some unravelings are not "valid", in that they contain subcomponents
# from different regions and thus represent a decomposition not used in any
@amake
amake / main.log
Created November 20, 2020 08:40
Sequel-Ace MacPorts build error
DEBUG: macOS 10.15 (darwin/19.6.0) arch i386
DEBUG: MacPorts 2.6.4
DEBUG: Xcode 12.2
DEBUG: SDK 10.15
DEBUG: MACOSX_DEPLOYMENT_TARGET: 10.15
DEBUG: Executing org.macports.main (Sequel-Ace)
DEBUG: dropping privileges: euid changed to 502, egid changed to 501.
DEBUG: fetch phase started at Fri Nov 20 17:38:02 JST 2020
---> Fetching distfiles for Sequel-Ace
DEBUG: Executing org.macports.fetch (Sequel-Ace)
@amake
amake / org-babel-tramp.org
Last active December 13, 2021 13:10
org-babel + tramp demonstration

This file demonstrates using org-babel and tramp together to execute a source block on a remote host. It was tested with Emacs 27.1 launched as emacs -Q (zero custom configuration).

I recommend that you download the raw version of this file, open it in Emacs, and evaluate the blocks yourself. In fact, if you don’t then you will miss the most important parts because they are hidden in the fancy GitHub rendering.

@amake
amake / katex-to-png-ios.swift
Last active June 30, 2020 15:02
Generate math PNGs on iOS with KaTeX (Xcode Playground)
import UIKit
import WebKit
import PlaygroundSupport
var html = """
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
@amake
amake / Makefile
Last active February 8, 2022 13:12
Convert HEIC images to MP4 video
SHELL := /bin/bash
# Requires ffmpeg, libheif
heic := $(wildcard *.HEIC)
jpg := $(heic:.HEIC=.jpg)
.PHONY:
all: silent-pingpong.mp4 with-audio-pingpong.mp4
@amake
amake / tikal.pom.xml
Created December 3, 2019 14:16
Run Okapi Tikal install-less with Maven
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- Execute tikal with Maven: mvn -q -f tikal.pom.xml exec:java -Dexec.args=-h -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.lake</groupId>
<artifactId>tikal</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>