Skip to content

Instantly share code, notes, and snippets.

View wjt's full-sized avatar
🚅
Travelling; I will be slow to respond until 17th November.

Will Thompson wjt

🚅
Travelling; I will be slow to respond until 17th November.
View GitHub Profile
#!/bin/bash
set -ex
source=scenes/tileset.tres
declare -A targets=(
[tiles/bridges.tres]="tiles for bridges (and their shadows)"
[tiles/elevation.tres]="cliff tiles (plain and mines)"
[tiles/exterior_floors.tres]="grass, sand, and dirt tiles"
[tiles/foam.tres]="foam tiles"
[tiles/void_chromakey.tres]="chromakey Void texture"
@wjt
wjt / tilemaplayer_diff.gd
Created October 29, 2025 10:12
Kludgy script to diff the TileMapLayers in two versions of a scene
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
@tool
extends EditorScript
const OLD = "res://orig.tscn"
const NEW = "res://scenes/quests/lore_quests/quest_001/3_stealth_level/stealth_level.tscn"
func _run() -> void:
var old: Node = load(OLD).instantiate(PackedScene.GenEditState.GEN_EDIT_STATE_INSTANCE)
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
@tool
extends EditorScript
const TILESET_PATHS := [
"scenes/quests/story_quests/shjourney/2_shjourney_intro/tilesetIntro02.tres",
"scenes/quests/story_quests/shjourney/3_shjourney_intro/tilesetIntro.tres",
"scenes/quests/story_quests/shjourney/4_Laberinto/tileselaberinto.tres",
"scenes/quests/story_quests/shjourney/5_shjourney_sequence_puzzle/tilesetMinijuego02.tres",
#!/usr/bin/python3
import argparse
import subprocess
import sys
import os
import shlex
def main():
parser = argparse.ArgumentParser()
@wjt
wjt / meld
Created December 11, 2023 16:59
I save this file as ~/.local/bin/meld
#!/usr/bin/python3
import argparse
import subprocess
import sys
import os
import shlex
def main():
parser = argparse.ArgumentParser()
#!/usr/bin/env python3
from gi.repository import GLib
import argparse
import itertools
def main():
parser = argparse.ArgumentParser()
parser.add_argument("wordlist", type=argparse.FileType("r"))
$ sudo ./eos-image-builder --show-apps --personality en eos4.0 

[ … debug output pruned … ]

Estimated installed size of apps: 40.2 GB Estimated compressed size of apps: 21.6 GB

== com.endlessm.apps.Platform//5 ==

#0 0x00007ffff6b90605 in raise () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff6b79899 in abort () at /usr/lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff6bd45bf in () at /usr/lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff6bd467a in __libc_fatal () at /usr/lib/x86_64-linux-gnu/libc.so.6
#4 0x00007ffff6bbd243 in () at /usr/lib/x86_64-linux-gnu/libc.so.6
#5 0x00007ffff6bbf83d in () at /usr/lib/x86_64-linux-gnu/libc.so.6
#6 0x00007ffff6bd33c5 in () at /usr/lib/x86_64-linux-gnu/libc.so.6
#7 0x00007ffff73a9c33 in g_vasprintf () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#8 0x00007ffff7384e55 in g_string_append_vprintf () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x00007ffff73850a8 in g_string_append_printf () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
@wjt
wjt / NOTES.md
Created October 1, 2020 13:49
Chrome Remote Desktop on Endless OS 3.8 and Fedora 32

I tried to make Chrome Remote Desktop work on Endless OS 3.8 and Fedora 32, with varying degrees of failure.

Endless OS

The chrome-remote-desktop.deb package that is downloaded by the installation process depends on python3-psutil (in our repo), some other X11 thing (in our repo), and x11-session-utils which is not in our repo.

I did the following:

  • eos-dev-unlock
@wjt
wjt / gist:355ba42cc519d0d4de8f6eb25ccfd940
Created September 22, 2020 09:04
cd $(flatpak info -l org.gnome.Totem.Codecs) && find -name '*.c' -or -name '*.h'
./files/include/libavcodec/mediacodec.h
./files/include/libavcodec/dirac.h
./files/include/libavcodec/avfft.h
./files/include/libavcodec/videotoolbox.h
./files/include/libavcodec/dxva2.h
./files/include/libavcodec/vdpau.h
./files/include/libavcodec/version.h
./files/include/libavcodec/vaapi.h
./files/include/libavcodec/dv_profile.h
./files/include/libavcodec/jni.h