Skip to content

Instantly share code, notes, and snippets.

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

Drewry Pope dezren39

🕵️‍♂️
Processing..
View GitHub Profile

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 / 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
package main
import (
"context"
"fmt"
"log"
"net/http"
"net/http/httputil"
"strings"
"time"
package main
import (
"context"
"fmt"
"log"
"net/http"
"net/http/httputil"
"strings"
"time"
@dezren39
dezren39 / LICENSE
Created February 26, 2024 10:19 — forked from shaneutt/LICENSE
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@dezren39
dezren39 / 0_bench_test.go
Created February 17, 2024 08:35 — forked from eliasdaler/0_bench_test.go
The quest for a good vector library for a gamedev
package main
import (
"testing"
"github.com/go-gl/mathgl/mgl32"
"github.com/kvartborg/vector"
"github.com/ungerik/go3d/vec2"
"gonum.org/v1/gonum/mat"
)
@dezren39
dezren39 / koanf.go
Created December 24, 2023 15:45 — forked from jxsl13/koanf.go
Koanf and Cobra integration
package config
import (
"errors"
"fmt"
"os"
"reflect"
"strconv"
"strings"
@dezren39
dezren39 / Update-machine-certificate-private-key-permissions.ps1
Created September 27, 2023 19:38 — forked from milesgratz/Update-machine-certificate-private-key-permissions.ps1
PowerShell example of updating machine certificate private key permissions (CAPI vs CNG)
# Get cert on local computer by thumbprint
$thumbprint = '89D3FC64B6405E161EDC7A4CF14E111F5F6895AA'
$Cert = Get-ChildItem Cert:\LocalMachine\My | Where-Object { $_.Thumbprint -eq $thumbprint }
###################################################
# Manage private key of CAPI cert
###################################################
# Find private key
$privKey = $Cert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName