Skip to content

Instantly share code, notes, and snippets.

View dezren39's full-sized avatar
🕵️‍♂️
Processing..

Drewry Pope dezren39

🕵️‍♂️
Processing..
View GitHub Profile
@dezren39
dezren39 / network.nix
Created October 16, 2024 01:43 — forked from mutantmell/network.nix
NixOS Router data-driven configuration
{ config, pkgs, lib, ... }:
let
# There were two main sources of inspiration for this configuration:
# 1. https://pavluk.org/blog/2022/01/26/nixos_router.html
# 2. https://francis.begyn.be/blog/nixos-home-router
# Thank you very much!
#
# network types:
# { type = "none"; } # Don't generate a network file

Hi @nrdxp + @edolstra -- I have a couple ideas for how to make things marginally better here but, tl;dr: I'd like feedback or direction from either or both of you on my idea before I invest more time, especially for exploring the proposed solutions that require C++ development. (Also, please let me know if you'd like me to move this from an issue comment to an RFC or even a, e.g., Google Doc design doc, for easier interaction.)

Problem Statement

In my words at a minimum:

flake authors need to be able to request submodule-fetching for the repository hosting flake.nix

(Please see my appendix for supporting use cases and UX/DX considerations if you aren't already convinced about this need. Also, @nrdxp, please let me know if you actually have a different motivating problem in mind?)

@dezren39
dezren39 / chi.go
Created August 20, 2024 01:19 — forked from alexaandru/chi.go
Chi-like syntactic sugar layer on top of stdlib http.ServeMux
// Chi-like syntactic sugar layer on top of stdlib http.ServeMux.
package main
import (
"net/http"
"slices"
)
type (
middleware func(http.Handler) http.Handler
@dezren39
dezren39 / resize-increment.c
Created July 31, 2024 03:33 — forked from intrntbrn/resize-increment.c
set WM_NORMAL_HINTS program specified resize increment for any client (e.g. alacritty)
/*
* Author: intrntbrn
*
* Compile with:
* gcc resize-increment.c -Wall -o resize-increment `pkg-config --cflags --libs x11`
*
* Usage:
* resize-increment windowid width_inc height_inc
* e.g.: resize-increment 1234567 6 12
*/
@dezren39
dezren39 / new-zed-node-symlink.sh
Last active July 24, 2024 03:54
new-zed-node-symlink.sh
document:sgvowvarjxkte674jdhtvky8#owner@wnfm0cvwfj6fv4kru4pt3dzt
group:engineering#member@group:security#...
group:engineering#manager@group:leadership#member
(definition)platform {
(relation)administrator "user"
(permission)super_admin "administrator"
}
(definition)organization {
(relation)platform "platform"
(permission)platform "super_admin"
}
(definition)resource {
(relation)owner "user" "organization"
go build -a -tags netgo -ldflags "-w -s" -o "/bin/" ./cmd/...
#!/usr/bin/env sh
dietpi-software install 188 # install latest go version (and git)
apt update
apt install -y wget
wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell_7.4.1-1.deb_amd64.deb
dpkg -i powershell_7.4.1-1.deb_amd64.deb
apt install -f
rm powershell_7.4.1-1.deb_amd64.deb
# curl -fsSL https://deb.nodesource.com/setup_21.x | bash - &&\
# apt-get install -y nodejs
@dezren39
dezren39 / main.c
Created March 6, 2024 00:06 — forked from mattiasgustavsson/main.c
Minimal code example for creating a window to plot pixels to
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <windows.h>
#pragma comment( lib, "user32.lib" )
#pragma comment( lib, "gdi32.lib" )
#define SCRW 640
#define SCRH 480