Skip to content

Instantly share code, notes, and snippets.

View lf-'s full-sized avatar
πŸ’­
GitHub πŸ’§πŸ§Š

jade lf-

πŸ’­
GitHub πŸ’§πŸ§Š
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