Skip to content

Instantly share code, notes, and snippets.

View lf-'s full-sized avatar

jade lf-

View GitHub Profile
@c0deaddict
c0deaddict / nixos-container-in-wireguard-vpn.nix
Created August 10, 2021 13:29
NixOS container in Wireguard VPN network namespace
{ lib, config, pkgs, ... }:
with lib;
let
veth = "veth-vpn";
hostIp = "10.0.0.1/24";
guestIp = "10.0.0.2/24";
Person = new Class {{
firstName: :attr,
lastName: :attr,
fullName: function {
`${this.firstName} ${this.lastName}`
},
@Innf107
Innf107 / comefrom.hs
Last active December 2, 2022 19:08
Haskell monadic COMEFROM
{-# LANGUAGE RankNTypes, PatternSynonyms, GADTs, ViewPatterns, LambdaCase, ScopedTypeVariables #-}
module Main where
import Data.Map as Map
import Control.Monad (ap, liftM)
import Data.IORef
data ComeFromOp a where
Line :: Int -> ComeFromOp ()
LiftIO :: IO () -> ComeFromOp ()
@riwsky
riwsky / jts
Last active August 28, 2025 11:17
graphite submit script for jujutsu repositories
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
jj fix
# Get the list of mutable branches that are reachable from the current branch
# (i.e. that are between us and main).
branches=$(jj branch list -r 'reachable(@,mutable())' --template 'name ++ "\n"')
@arianvp
arianvp / README.md
Last active February 13, 2025 22:15

Asynchronous post-build-hook

this hook queues up store paths on a unix domain socket and then spawns a service to actually push the store path to the cache through socket activation

works on MacOS and Linux

@davidbarsky
davidbarsky / SKILL-1.md
Last active April 24, 2026 14:23
my Claude skills for authoring Rust. See the first comment for installation instructions!
name rustdoc
description Rust documentation conventions (RFC 1574). Apply when writing doc comments on public Rust items. Covers summary sentences, section headings, type references, and examples.

Rust Documentation Conventions (RFC 1574)

Apply these rules when writing doc comments (///) on public Rust items.

Summary Sentence