Skip to content

Instantly share code, notes, and snippets.

{
"tech.lgbt": 92,
"transfem.social": 82,
"a.bloodyno.se": 80,
"60228.dev": 76,
"myfriendsare.gay": 51,
"eepy.moe": 50,
"gaysex.cloud": 48,
"brain.worm.pink": 48,
"wetdry.world": 47,
/* ==UserStyle==
@name unfuck discord
@namespace easrng
@version 0.0.2
@author easrng
==/UserStyle== */
@-moz-document domain("discord.com") {
:root {
--font-primary: "Roboto", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
--font-display: "Roboto", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
@easrng
easrng / signal usercss loader.sh
Created February 15, 2025 07:56
load custom css or whatever into signal-desktop
#!/bin/sh
SELF="$(dirname "$(realpath "$0")")"
cc -x c - -shared -o "$SELF/uwu.node" -fPIC -Oz -static -nostdlib <<'EOF'
#include "stddef.h"
int napi_create_string_latin1(void *env, const char *str, size_t length,
void **result);
int napi_run_script(void *env, void *script, void **result);
void uwu_injecting_time(void *ptr) {
void *result;
char js[] = "process.getBuiltinModule('module').createRequire(process.cwd()+'"
@easrng
easrng / make.sh
Created January 7, 2025 04:10
🥴
#!/bin/sh
deps="-p gnumake -p clang -p esbuild -p nodejs_22 -p corepack_22 -p wget -p cacert"
set -eu
self="$(realpath "$(command -v "$0")")"
cd "$(dirname "$self")"
mkdir -p build
nix_state="$( (printf "%s\n" "$self" "$NIX_PATH" | tee /dev/stderr | tr ':' '\n' | sed -E 's/^.+=//' | xargs ls -l) 2>&1)"
if [ ! -e build/.env.cache ]; then
#!/bin/sh
_unix_connect_setup() {
if command -v busybox >/dev/null && busybox --list | grep ^nc$ >/dev/null && ! nc local: 2>&1 | grep 'bad port' >/dev/null; then
_unix_connect_cmd=busybox
_unix_connect_flags=nc
_unix_connect_prefix=local:
return
fi
if command -v nc >/dev/null && ! nc 2>&1 | grep BusyBox >/dev/null; then
_unix_connect_cmd=nc
@easrng
easrng / serve.ts
Last active June 2, 2024 05:42
cross-runtime http `serve` function for js
/// <reference lib="webworker" />
// @ts-ignore
type _makeTSPlaygroundLoadTheBunTypes = import("bun-types");
type ServeOptions = {
fetch: (req: Request) => PromiseLike<Response> | Response;
port?: number;
hostname?: string;
signal?: AbortSignal;
@easrng
easrng / install.sh
Created February 16, 2024 10:52
install busybox shims on vfat filesystem (no symlinks) (bbins should be list of paths busybox --install fails on)
while IFS= read -r line; do printf '#!/bin/busybox ash\nexec busybox %s "$@"\n' "$(echo "$line" | busybox sed -E 's/.+\/([^\/]+)$/\1/')" >"$line"; busybox chmod +x "$line"; done < ./bbins
@easrng
easrng / AO3-style content warnings.toml
Created February 3, 2024 09:25
prechoster (https://cloudwithlightning.net/random/chostin/prechoster/) template for AO3-style content warnings on cohost
version = 1
title = 'Svelte Templating'
[[modules]]
plugin = 'source.svelte'
data.contents = '''
<script>
import AO3 from "./AO3.svelte";
</script>
import { lowercaseKeys } from "https://esm.town/v/stevekrouse/lowercaseKeys?v=1";
import OpenAI from "npm:openai@^4.0.0";
const openai = new OpenAI();
const input = String
.raw`Some types are fine to use from multiple threads, as long as only a single thread at a time uses a
particular value. An example here would be a ${"`"}Cell<i32>${"`"}. If two threads have a reference to a cell
at the same time, a ${"`"}&Cell<i32>${"`"}, we are in trouble --- ${"`"}Cell${"`"}'s loads and stores are not atomic
and are UB by definition if used concurrently. However, if two different threads have exclusive
access to a ${"`"}Cell${"`"}, that's fine --- because the access is exclusive, it necessary means that it is
not simultaneous. That is, it's OK for thread A to _send_ a ${"`"}Cell<i32>${"`"} to a different thread B,
@easrng
easrng / cwtch-bin.nix
Last active December 9, 2023 06:10
Cwtch (Metadata Resistant Chat) packaged for nix
{
stdenv, lib, fetchurl, autoPatchelfHook, makeWrapper,
zlib, gdk-pixbuf, cairo, libepoxy, at-spi2-atk, glib, gtk3, pango, harfbuzz, fontconfig
}:
stdenv.mkDerivation rec {
pname = "cwtch-bin";
version = "1.13.2";
src = fetchurl {