Skip to content

Instantly share code, notes, and snippets.

View zicklag's full-sized avatar
🛰️
Making awesome stuff!

Zicklag zicklag

🛰️
Making awesome stuff!
View GitHub Profile
{
"version": 1,
"nodes": [
{
"name": "storage",
"isDefault": false,
"location": {
"filename": "file:///home/zicklag/git/muni-town/leaf/src/leaf.ts",
"line": 22,
"col": 7,
@zicklag
zicklag / example.ts
Created January 24, 2025 23:29
Loro timetravel
// Get the snapshot for your doc
let snapshot = fetchSnapshot();
// Import your doc
const doc = new LoroDoc();
doc.import(snapshot);
// NOTE: Make sure that whenever you wrote to the doc you enabled timestamps.
// This is important to make sure that we have a simple way to order
// changes based on user intuition.
@zicklag
zicklag / theme.html.j2
Created January 14, 2025 23:56
Demo Weird Theme
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="canonical" href="{{handle}}" />
<style>
@zicklag
zicklag / client.json
Last active December 26, 2024 00:00
Localhost client metadata for AtProto
{
"client_id": "https://gist.githubusercontent.com/zicklag/89bd0c2519757c6d6429390e5fcd222a/raw/client.json",
"client_name": "Localhost App",
"client_uri": "http://127.0.0.1:8080",
"logo_uri": "http://127.0.0.1:8080/public/favicon.ico",
"tos_uri": "https://gist.githubusercontent.com/zicklag/89bd0c2519757c6d6429390e5fcd222a#file-tos-md",
"policy_uri": "https://gist.githubusercontent.com/zicklag/89bd0c2519757c6d6429390e5fcd222a#file-policy-md",
"redirect_uris": ["http://127.0.0.1:8080/auth/callback"],
"scope": "atproto",
"grant_types": ["authorization_code", "refresh_token"],
@zicklag
zicklag / monitor-pipewire-conns.sh
Created December 7, 2024 21:09
My way to automatically connect pipewire ports.
#!/bin/bash
CMDS=$(mktemp -u)
EVENTS=$(mktemp -u)
mkfifo "$CMDS"
mkfifo "$EVENTS"
cat "$EVENTS" > /dev/null &
pw-cli < "$CMDS" > "$EVENTS" &
@zicklag
zicklag / docker-deployer.ts
Created November 3, 2024 19:05
A mini script to re-deploy a docker container with deno and a webhook.
import { Server } from "https://deno.land/[email protected]/http/server.ts";
const containerName = "bones-matchmaker-main";
const containerImage = "ghcr.io/fishfolk/bones-matchmaker:main";
async function updateContainer() {
console.log("Updating container");
// Stop the container if it is already running
await Deno.run({ cmd: ["docker", "stop", containerName] }).status();
@zicklag
zicklag / dns-reservation.qnt
Last active October 29, 2024 14:25
Work-in-progress non-racy dns txt reservation protocol Quint specification.
module dns {
type Server = str
type Hostname = str
type Pubkey = str
type Option[a] =
| Some(a)
| None
type Reservation = { hostname: Hostname, pubkey: Pubkey }
pure val weirdKey = "weird"
@zicklag
zicklag / README.md
Created August 28, 2024 19:20
Custom, dumb, simple pow in the browser.

Inspired by and is somehow way worse.

@zicklag
zicklag / README.md
Last active August 19, 2024 23:15
Simple Force-directed Graph Algorithm
@zicklag
zicklag / exploding-cards.md
Created June 13, 2024 00:07 — forked from paulera/exploding-cards.md
Exploding cards: Explodding Kittens variant, with regular playing cards

Exploding cards

This is a variant of the Exploding Kittens game rules, using regular playing cards

  • 1 deck: 3 to 8 players
  • 2 decks: up to 16 players

Objective

The last survivor wins the game. If you draw a Bomb card and don't have a Disarm card, you die.

Preparing the game