Skip to content

Instantly share code, notes, and snippets.

View relative's full-sized avatar
🔥

relative

🔥
View GitHub Profile
@relative
relative / esbuild-plugin-wat.cjs
Created August 25, 2023 21:38
esbuild .wat->wasm loader
// Loosely based upon example WebAssembly plugin in esbuild docs
// https://esbuild.github.io/plugins/#webassembly-plugin
const childProcess = require('child_process'),
path = require('path'),
util = require('util')
const execFile = util.promisify(childProcess.execFile)
const ErrorMatchRegex = /(?<path>.+?):(?<line>\d+):(?<col>\d+): (?<type>error|warning): (?<message>.+)/i,
@relative
relative / disable-regexr-js-warnings.user.js
Last active August 25, 2023 21:25
Userscript to disable JS warnings on regexr.com
// ==UserScript==
// @name Disable regexr warnings
// @namespace relative
// @match https://www.regexr.com/*
// @match https://regexr.com/*
// @grant none
// @version 1.0
// @author relative
// @description 8/25/2023, 5:17:18 PM
// @run-at document-idle
-- Tested on PostgreSQL 15.1.
-- https://gist.github.com/srfrog/ef8c9a3a4282b865fb93f429d671d63b
-- https://github.com/paralleldrive/cuid2 56c54483bd7d5dd12343211c14588265e00f0887
CREATE SEQUENCE IF NOT EXISTS "cuid2_seq";
CREATE OR REPLACE FUNCTION _counter() RETURNS VARCHAR AS $$
DECLARE
val bigint;
BEGIN
@relative
relative / a.md
Last active July 28, 2026 14:04
GHE

Important

The following instructions target GHES 3.21.0 released 11 Jun 2026. You WILL need to pull updated "vault.rb", "ff_config.rb", "vexi_management_with_call_tracking.rb" files from the github Docker image AND update the docker.sh script to update the "vault.rb" path on newer releases.

Usage

sudo apt install -y \
  fish \
 moreutils \