Skip to content

Instantly share code, notes, and snippets.

View dneumann42's full-sized avatar
๐Ÿš‚

dneumann dneumann42

๐Ÿš‚
  • Walla Walla
View GitHub Profile
@dneumann42
dneumann42 / pretty.lua
Last active April 21, 2025 18:05
pretty.lua
local function tostring_pretty(value, cache, ident)
if type(value) ~= "table" then
if type(value) == "string" then
return '"' .. tostring(value) .. '"'
end
return tostring(value)
end
cache = cache or {}
ident = ident or " "
@dneumann42
dneumann42 / errorHandling.nim
Created September 27, 2024 01:16
Error handling macros in nim
template `?`* [T](o: Option[T]) =
block:
if o.isNone:
return none(T)
o.get()
macro R(T, F, p: untyped) =
expectKind(p, nnkProcDef)
p[3][0] = nnkBracketExpr.newTree(newIdentNode("Result"), T, F)
let templateDefs = quote do:
@dneumann42
dneumann42 / arch-packages
Created February 20, 2024 23:51
Arch Packages for bootstraping
git
neovim
firefox
w3m
curl
@dneumann42
dneumann42 / linux-bootstrap.sh
Last active April 12, 2024 14:50
Dustin's bootstrapping script
#!/usr/bin/env bash
DOTS_REPO="https://github.com/dneumann42/dots"
NVIM_REPO="https://github.com/dneumann42/neovim-config"
PACKAGES=(
## Core
"git"
"zsh"
"kitty"
@dneumann42
dneumann42 / bootstrap.sh
Last active October 11, 2023 19:57
Bootstrapping nix config and home manager
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash
curl "https://gist.githubusercontent.com/dneumann42/be0789f4ccc0478ced0b80aa5daf9251/raw"
sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
sudo nix-channel --update