Skip to content

Instantly share code, notes, and snippets.

View amake's full-sized avatar
🌵

Aaron Madlon-Kay amake

🌵
View GitHub Profile
@amake
amake / innosetup-linux-macos.org
Last active April 17, 2024 13:34
Inno Setup on Linux and macOS

Inno Setup on Linux and macOS

Inno Setup is a popular installer builder for Windows. Of course it is made to run on Windows only, by default. But what if you want to build Windows installers off Windows, i.e. on Linux or macOS?

You’re in luck: It’s possible to run Inno Setup anywhere that Docker runs (including Linux and macOS), and even have a passable experience writing your setup script.

@amake
amake / git-svn-jenkins.org
Last active January 31, 2024 03:37
git-svn-Jenkins: Automating an svn-to-git mirror with hosted CI

Automating an svn-to-git mirror with hosted CI

There are plenty of tutorials for migrating from Subversion to git via git-svn, but they all seem to be focused on a one-time migration after which further development will happen in git. Otherwise the obvious use case for git-svn is where a lone developer uses git to push and pull to a Subversion repository from his local machine.

Like me, however, you may find yourself involved in a Subversion-hosted FOSS project with conservative leadership that strongly prefers Subversion to git. This project may also have an official git mirror of the svn repo, synced for years from a core developer’s personal machine.

You may then find yourself spearheading an effort to move this mirroring infrastructure to your project’s newly licensed hosted CI service.

This article discusses two main topics:

@amake
amake / android-7-localization.org
Last active July 25, 2023 22:34
Correct localization on Android 7

Correct localization on Android 7

Prior to Android 7, the system had a single preferred locale, and fallback behavior was quite rudimentary. Starting with Android 7, the user can now specify a priority list of locales, and fallback behavior is improved.

However, in many cases it is still surprisingly difficult to make full use of locale fallback, and there are some hidden gotchas when trying to fully support both Android 7 and earlier versions.

@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 / lg2tmx.xsl
Last active April 26, 2022 01:31
An XSLT to convert Apple *.lg glossaries into TMX
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Convert Apple *.lg glossaries to TMX. Usage:
xsltproc [-o <output file>] [-\-stringparam srclang <source lang>] lg2tmx.xsl <input file>
If not specified, the TMX header's srclang attribute defaults to "*all*".
Get glossaries at https://developer.apple.com/downloads/?name=glossaries -->
<xsl:output method="xml" indent="yes" encoding="UTF-8" />
<xsl:param name="srclang" select="'*all*'" />
<xsl:template match="/">
<tmx version="1.4">
@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 / 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