Skip to content

Instantly share code, notes, and snippets.

@zigforge
zigforge / 00_install_fbsd_14_1_hetzner.md
Created October 11, 2024 12:55 — forked from ctsrc/00_install_fbsd_14_1_hetzner.md
Install FreeBSD 14.1 on Hetzner

Install FreeBSD 14.1 on Hetzner server

Hetzner no longer offers direct install of FreeBSD, but we can do it ourselves. Here is how :)

Boot the server into rescue mode

Boot the Hetzner server in Hetzner Debian based rescue mode. ssh into it.

The Hetzner rescue image will tell you hardware details about the server in the login banner. For example, with one of my servers I see:

@zigforge
zigforge / hls.sh
Created November 9, 2024 00:29 — forked from stenuto/hls.sh
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@zigforge
zigforge / README.md
Created November 14, 2024 16:04 — forked from cld4h/README.md
Bypass the GFW; clash fake-ip and tproxy; iptables and transparent proxy on Linux; 在Linux上通过 iptables 以及 clash 配置透明代理用于本机及局域网翻墙网关; Linux 翻墙路由器配置

This article show you the ultimate way to set up a transparent proxy on Linux using clash and iptables to bypass the GFW in China.

We use:

You can go to github gist to download all files mentioned in this article.

import { Client } from "@upstash/qstash"
import { NextRequest } from "next/server"
const baseUrl = process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL}`
: "http://localhost:3000"
interface Step<I> {
create: <O>(action: (prevResult: Awaited<I>) => O) => Step<O>
finally: (action: (prevResult: Awaited<I>) => any) => any
@zigforge
zigforge / WorkerQueue.ts
Created December 9, 2024 14:58 — forked from yonathan06/WorkerQueue.ts
WorkerQueue.ts (54 lines lightweight typescript worker queue)
interface QueueItem<T, R> {
task: T;
resolve: (result: R) => void;
reject: (error: Error) => void;
}
type Worker<T, R> = (task: T) => Promise<R>;
export class WorkerQueue<T, R> {
queue: QueueItem<T, R>[];
@zigforge
zigforge / agent.py
Created July 31, 2025 03:12 — forked from leerob/agent.py
agent.py
import os
import json
import subprocess
from anthropic import Anthropic
# Tool definitions
TOOLS = [
{
"name": "list_files",
"description": "List files and directories at a given path",