Skip to content

Instantly share code, notes, and snippets.

View tjbcg's full-sized avatar
💭

Théophile Cailliau tjbcg

💭
View GitHub Profile
@tjbcg
tjbcg / sioyek-9999.ebuild.patch
Created August 19, 2025 17:57
Sioyek ebuild for wayland
--- ../../../guru/app-text/sioyek/files/shim.sh 1970-01-01 01:00:00.000000000 +0100
+++ ./files/shim.sh 2025-08-19 13:08:03.390721842 +0200
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Run sioyek with the correct graphics-related environment on wayland
+
+if [ "${XDG_SESSION_TYPE:-}" = "wayland" ]; then
+ export __GLX_VENDOR_LIBRARY_NAME=mesa
+ export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
+ export MESA_LOADER_DRIVER_OVERRIDE=zink
@tjbcg
tjbcg / injlim-projlim-tyspt.md
Last active August 6, 2025 12:42
Direct and inverse limits in Typst

Quick snippet to add injlim and projlim to typst, defined as math operators with the correct baseline.

Keywords: direct limit, inverse limit, projective limit, injective limit, colimit, varinjlim varprojlim

output
@tjbcg
tjbcg / PLAYDATE_PATCH.md
Created June 5, 2025 23:37
Patch the playdate simulator for systems with different webkitgtk versions !

Patching the playdate simulator for newer webkitgtk versions

WebkitGTK versions 4.0 is being removed from gentoo's main repo, in favour of the equivalent 4.1 version. This breaks PlaydateSimulator which dynamically loads libwebkit2gtk-4.0.so.37.

The dirty hack would be to symlink the newer sofiles to the old filenames. Any sane person would dislike this approach though, as it specifically works around the package manager and messes with system-wide libraries. Instead, we can patch the ELF to directly request the newer versions.

cd $PLAYDATE_SDK_PATH
cd bin
patchelf --replace-needed libwebkit2gtk-4.0.so.37 libwebkit2gtk-4.1.so PlaydateSimulator
@tjbcg
tjbcg / README.md
Created May 29, 2024 15:39
Custom caddy modules with portage on gentoo

Caddy ebuild override for custom modules

Use at your own risks! This hook is basically hijacking the $MY_MODULES variable used in the caddy ebuild. Disabling the network sandbox is required to allow go to pull in custom modules at compile time.

Untested with live ebuild.

@tjbcg
tjbcg / build_sioyek.sh
Last active August 19, 2025 18:35
An almost self-contained bash script that builds sioyek from scratch on macOS
#!/usr/bin/env bash
set -e
COLOR='\033[1;32m'
NC='\033[0m' # No Color
log() {
echo -e "${COLOR}#" $@ "${NC}"
}
@tjbcg
tjbcg / ctan2devhelp.fish
Created March 21, 2019 21:11
A quick and dirty script to transform ctan documentation pdf to devhelp booklet
#!/usr/bin/env fish
#
# Smelly code ahead
set file $argv[1]
set bn (basename $file | rev | cut -d. --complement -f1 | rev)
set pdf2htmlEX docker run -ti --rm -v (pwd):/pdf bwits/pdf2htmlex pdf2htmlEX
$pdf2htmlEX --printing 0 --embed-outline 0 --zoom 1.2 $file

Keybase proof

I hereby claim:

  • I am fliife on github.
  • I am fliife (https://keybase.io/fliife) on keybase.
  • I have a public key ASDF_klGxhU0wwwCLYGALxTgbFoBHRdLCRbkcBDVus4_Bwo

To claim this, I am signing this object:

@tjbcg
tjbcg / README.md
Created May 10, 2017 12:03
A base16-shell script to configure your terminal.

Jay base16-shell

This script is made to be used along base16-shell. Just put it in scripts/ and use jay as the colorscheme.

I take no credit for this, full credit is given to josuegaleas

@tjbcg
tjbcg / bgyjpb.markdown
Last active January 28, 2017 21:12
SDD POWA
@tjbcg
tjbcg / designer.html
Last active January 11, 2017 16:59
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>