Skip to content

Instantly share code, notes, and snippets.

View ian-h-chamberlain's full-sized avatar
🏔️

Ian Chamberlain ian-h-chamberlain

🏔️
View GitHub Profile
@ian-h-chamberlain
ian-h-chamberlain / README.md
Created July 19, 2026 05:44 — forked from Informatic/README.md
openlgtv webOS hacking notes

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas

From 9908f1bbec2c60b5c6e8a57bcaab2e25a48f8be7 Mon Sep 17 00:00:00 2001
From: Ian Chamberlain <ian.h.chamberlain@gmail.com>
Date: Fri, 10 Jul 2026 00:23:30 -0700
Subject: [PATCH] Enable `debug` and C modules with Lua::unsafe_new()
---
config/src/lua.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/src/lua.rs b/config/src/lua.rs
@ian-h-chamberlain
ian-h-chamberlain / .gitignore
Last active August 10, 2025 04:26
Flake for helix + steel
# Nix
result*
# Misc
.direnv
@ian-h-chamberlain
ian-h-chamberlain / wezterm-keyhelper.lua
Last active April 21, 2025 01:06
Helper function to abbreviate wezterm key definitions
local function keys(tbl)
local result = {}
for k, act in pairs(tbl) do
local mods, last
for key in k:gmatch('([^-]+)') do
if last then
if mods then
mods = mods .. '|' .. last
else
mods = last
@ian-h-chamberlain
ian-h-chamberlain / 15-direnv.fish
Last active March 11, 2025 04:30
Direnv helper to load extra nixpkgs into the environment
if upfind .envrc >/dev/null; and command -q direnv; and not set -q DIRENV_DIR
# Do an early load of env vars so that things like XDG_DATA_DIRS can take effect
direnv export fish | source
# Then re-exec fish for $__fish_data_dir/config.fish to pick up the vars
# https://fishshell.com/docs/3.7/language.html#configuration-files
# So far this seems to be the only option to pick up .direnv/ files...
exec fish
# TODO: PWD var hook to exec again for unsetting XDG_DATA_DIRS
# Possible inspiration: https://github.com/direnv/direnv/issues/73#issuecomment-747646730
@ian-h-chamberlain
ian-h-chamberlain / .gitconfig
Last active February 27, 2025 05:16
custom sorting git branches
[alias]
# this is gnarly but it's based on the hardcoded upstream default:
# https://github.com/git/git/blob/08bdfd453584e489d5a551aecbdcb77584e1b958/builtin/branch.c#L386
# The idea is to add a field for commit date and another for a "known prefix", which sort -k can use
# I wodner if this is worth breaking out into its own helper script (git-br) instead
br = "git branch --color --format '%(committerdate:unix)'\t'%(if:equals=refs/heads/test)%(refname:rstrip=-3)%(then)1%(else)0%(end)'\t'%(HEAD) %(if)%(HEAD)%(then)%(color:green)%(else)%(color:normal)%(end)%(refname:short)' | sort -r -n -k 2 -k 1 | cut -d \t -f3"
@ian-h-chamberlain
ian-h-chamberlain / remove_less_equal.py
Created May 15, 2024 19:43
fontforge remove `less_equal.alt` lookup
#!/usr/bin/env fontforge
import sys
import fontforge
def main():
for font_name in sys.argv[1:]:
font = fontforge.open(font_name)
@ian-h-chamberlain
ian-h-chamberlain / README.md
Last active May 15, 2025 02:39 — forked from majal/minterpolate
Multi-threaded minterpolate in ffmpeg

Example command

cd ~/Movies/Wallpapers
./minterpolate.sh -r 240 -s '11:48' -t '12:08' -i Morphys_World.webm test.mov
@ian-h-chamberlain
ian-h-chamberlain / lnav-nginx-netdata.json
Created December 20, 2023 14:44 — forked from notyal/lnav-nginx-netdata.json
lnav log format definition for NGINX access.log (netdata vhost format) and NGINX error.log
{
"nginx_access_log" : {
"title" : "NGINX NetData Access Log",
"description" : "NGINX NetData Access Log Format",
"url" : "https://github.com/netdata/netdata/blob/master/collectors/python.d.plugin/web_log/web_log.conf",
"multiline" : false,
"regex" : {
"netdata_vhost" : {
"pattern" : "(?P<host>[a-zA-Z\\d.-_\\[\\]]+)\\s+(?P<server_port>\\d+)\\s+(?P<remote_addr>[\\da-f.:]+)\\s+[\\w\\.\\-]+\\s+(?<remote_user>\\S+)\\s+\\[(?<timestamp>[^\\]]+)\\]\\s+\"(?:\\-|(?<request>\\w+) (?<request_uri>[^ \\?]+)(?:\\?(?<request_uri_query>[^ ]*))? (?<request_version>[\\w\\\/\\.]+))\"\\s+(?P<status>[1-9]\\d{2})\\s+(?P<body_bytes_sent>\\d+)\\s+(?P<request_length>\\d+)\\s+(?P<request_time>\\d+(?:.\\d+)?)\\s+(?:\\-|(?P<upstream_response_time>\\d+(?:.\\d+)?))\\s+\"(?<http_referer>[^\"]+)\"\\s+\"(?<http_user_agent>[^\"]+)\""
}