A friendly message to other coders using AI for PRs. For more information, see: justsayno.ai
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env nix-shell | |
| #! nix-shell --pure -i runghc -p "ghc.withPackages (pkgs: [])" | |
| ----------------------------------------------------------------------------- | |
| -- | | |
| -- scons2dot - Generates graphviz file of scons dependency information | |
| -- Copyright (C) 2008 Leandro Penz | |
| -- | |
| -- This program is free software; you can redistribute it and/or modify | |
| -- it under the terms of the GNU General Public License as published by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax default | |
| color ,green "[[:space:]]+$" | |
| syntax "typst" "\.typ(st)?" | |
| # a lot of typst files start with setting the text language or the page format | |
| header "^#set (page|text)\(.*" | |
| # how to comment single lines | |
| comment "// |" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Usage: nseq <depth> <expr to strict-ify> <return value> | |
| # Example: | |
| # { ... }@args: | |
| # builtins.trace (builtins.nseq 3 args args) 45 | |
| # (ps: yes, this is probably extremly inefficient but for my defense i have bigger problems right now) | |
| nseq = n: val: ret: | |
| if n == 0 then | |
| builtins.seq val ret | |
| else if builtins.isList val then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # shellcheck shell=bash | |
| # create a new shell/env with a NIX_PATH based on the pins in npins/sources.json | |
| pinsDir="${NPINS_DIRECTORY:-npins}" | |
| if [[ -v 1 ]] && { [[ "$1" = "-d" ]] || [[ "$1" = "--directory" ]]; }; then | |
| shift | |
| [[ -v 1 ]] || (echo "Option '--directory' expected an argument"; exit 1) | |
| pinsDir="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # shellcheck shell=bash | |
| # print information about a given package (by default, from nixpkgs) | |
| if [[ "${1:-}" = "-h" ]] || [[ "${1:-}" = "--help" ]]; then | |
| exe="$(basename "$0")" | |
| echo -e "\x1b[1m$exe: search packages and print info about them\x1b[0m" | |
| echo -e | |
| echo -e "usage:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # from: https://nikita.computer/posts/makefile-tips/ | |
| .PHONY: help | |
| help: ## Show this help message | |
| @grep --no-filename -E '^[a-zA-Z_-]+:.*?##.*$$' $(MAKEFILE_LIST) | awk 'BEGIN { \ | |
| FS = ":.*?## "; \ | |
| printf "\033[1m%-30s\033[0m %s\n", "TARGET", "DESCRIPTION" \ | |
| } \ | |
| { printf "\033[32m%-30s\033[0m %s\n", $$1, $$2 }' |
This is a small shell script + systemd service file that reroutes/NATs all outgoing traffic through a local-running tunnel (listening on port 18000).
This is meant to be used with the tunnel and systemd files from ebpf-tunnel.
In fact, it should be a drop-in replacement for ebpf-rerouter (and its service file).
However, the two cannot coexist, so if you've already installed the first one,
you'll need to disable ebpf-rerouter:
sudo systemctl stop ebpf-rerouter.service
sudo systemctl disable ebpf-rerouter.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nft add table ip nat | |
| nft add chain ip nat output '{ type nat hook output priority 0 ; }' | |
| nft add rule ip nat output 'meta skuid cntlm ip protocol tcp accept ;' | |
| nft add rule ip nat output ip protocol 'tcp ip daddr != 127.0.0.1/24 dnat ip to 127.0.0.1:18000 ;' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # syno -- a basic thesaurus CLI based on fzf | |
| # | |
| # == USAGE == | |
| # You can either start syno directly, or give an initial query | |
| # syno | |
| # syno 'lovely' | |
| # This will open `fzf` in interactive mode, displaying a list | |
| # of matching words on the left, and the thesaurus enties on the right. |
NewerOlder