Skip to content

Instantly share code, notes, and snippets.

View jeremy-code's full-sized avatar

Jeremy Nguyen jeremy-code

View GitHub Profile
I wanted to see which browsers supported XSLT (caniuse only lists the XSLTProcessor API)
- Internet Explorer 5, with the MSXML3 add-on; natively in Internet Explorer 6 ([source](https://web.archive.org/web/20010208095513/http://msdn.microsoft.com/library/psdk/xmlsdk/xslp44kx.htm))
- Mozilla 0.9 ([source](https://web.archive.org/web/20010413155836/http://www.mozilla.org:80/projects/xslt/))
- Chrome quotes [Firefox 1.5](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/1.5)
- WebKit 3 ([source](https://www.webkit.org/blog/122/webkit-3-10-new-things/)), WebKit used to have an [Open Source page](https://web.archive.org/web/20061011203342/http://webkit.org/projects/xslt/index.html) on this
- Chrome: just says 1 ([source](https://chromestatus.com/feature/4730954895589376))
> A use counter measurement from the Chrome Beta channel indicates that less than 0.02% of page views use XSLT. Moreover, less than 0.003% of page view use the XSLT processing instruction. (The balance use XSLT via the XSLT
@jeremy-code
jeremy-code / README.md
Created April 20, 2025 22:48
JSPI Emscripten C

JavaScript Promise Integration (JSPI) is a Phase 4 (Standardize the Feature) WebAssembly proposal for running asynchronous Web APIs alongside synchronous code.

JSPI is supported under the following browsers/engines through enabling a feature flag:

Chrome: chrome://flags/#enable-experimental-webassembly-jspi

Firefox: javascript.options.wasm_js_promise_integration

Node.js: --experimental-wasm-jspi

@jeremy-code
jeremy-code / example.txt
Created April 18, 2025 03:25
Encoding Error Example
Héllo 🌍
root@b52c99f486ca:/src/scripts# emcc -v -lembind --emit-tsd ../output/test.d.ts ../module/test.cpp -sVERBOSE=1
/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --sysroot=/emsdk/upstream/emscripten/cache/sysroot -DEMSCRIPTEN -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -v -c ../module/test.cpp -o /tmp/emscripten_temp_g66u0n1f/test_0.o
clang version 21.0.0git (https:/github.com/llvm/llvm-project 553da9634dc4bae215e6c850d2de3186d09f9da5)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /emsdk/upstream/bin
(in-process)
"/emsdk/upstream/bin/clang-21" -cc1 -triple wasm32-unknown-emscripten -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test.cpp -mrelocation-model static -mframe-pointer=none -ffp-contract=on -fno-rounding-math -mconstructor-aliases -target-cpu generic -fvisibili
@jeremy-code
jeremy-code / README.md
Last active April 13, 2025 03:50
macOS `spctl` Hidden Commands

Per spctl's man page (x-man-page://spctl), it recognizes a few commands for a main operation:

spctl --assess [-t type] [-] file ...
spctl --global-enable
spctl --global-disable
spctl --disable-status
spctl --status
@jeremy-code
jeremy-code / README.md
Created April 11, 2025 21:35
Watch output of `defaults read`

I'm experimenting with matching changes made in the System Settings app with the output of defaults read, and I made this quick script for help with that.

It's not perfect -- namely, defaults read outputs in OpenStep format which is very much not machine parseable, but the alternative is using defaults export which requires you to list a domain, which would be much more complicated (though not impossible using defaults domains).

You will probably need to add more or less ignored_lines depending on what apps you use.

@jeremy-code
jeremy-code / README.md
Created April 4, 2025 23:53
ZSH path setting
@jeremy-code
jeremy-code / README.md
Created April 2, 2025 18:04
Docker Compose Configs Permissions

TL;DR: I think config files by default are root:root (UID 0, GID 0) and user and group readable (0440)

Here's the Docker documentation: Services top-level elements > Attributes > configs. Of note is:

uid and gid: The numeric uid or gid that owns the mounted config file within the service's task containers. Default value when not specified is USER.

mode: The permissions for the file that is mounted within the service's task containers, in octal notation. Default value is world-readable (0444). Writable bit must be ignored. The executable bit can be set.

In Configs top-level elements, it is stated

@jeremy-code
jeremy-code / README.md
Created March 25, 2025 05:49
GnuPG Permissions Configuration

GnuPG Permissions Configuration

TL;DR

If you only care about getting rid of the warning:

# Use root to make the user the owner of the GPG homedir and the GPG config file
sudo chown $USER ~/.gnupg ~/.gnupg/gpg.conf

# Set directory to allow the user to read, write and search (execute)
@jeremy-code
jeremy-code / config.xml
Created March 13, 2025 00:35
Folding@home IP addresses/IP ranges config file
<!--
This is the `config.xml` for a Folding@Home client that explicitly specifies the
IP addresses of the servers it is allowed to connect to. IP addresses are from
{@link https://apps.foldingathome.org/serverstats}.
-->
<!-- This config uses only IP addresses -->
<config>
<allow value="34.72.228.44"/> <!-- stxfahwork01.silicontx.com -->
<allow value="44.205.73.79"/> <!-- mskcc2.foldingathome.org -->