Skip to content

Instantly share code, notes, and snippets.

@chozahell
chozahell / README.md
Created November 24, 2024 22:08 — forked from ArgonQQ/README.md
Brew install specific version / Locally freeze version

Brew install specific version / Locally freeze version

# Please define variables
packageName=<packageName>
packageVersion=<packageVersion>

# Create a new tab
brew tap-new local/$packageName
@xianlin
xianlin / nftables.conf
Last active November 29, 2024 14:50
nftables
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
# Define allowed IP range
set allowed_nets {
type ipv4_addr
flags interval
elements = {
@evanesoteric
evanesoteric / nftables.conf
Created November 2, 2024 19:47
Nftables ruleset
#!/usr/bin/nft -f
# vim:set ts=2 sw=2 et:
flush ruleset
# whitelist { admin, office }
define admin = { 10.10.10.10, 172.16.0.0/16 }
# blacklist
@fabiojmendes
fabiojmendes / main.nft
Last active April 18, 2025 18:26
Nftables configuration that plays nice with podman
# This config is based on the original nftables
# config that ships with fedora/rocky/rhel
# Added podman_allowed so it works with podman
# Sample configuration for nftables service.
# Load this by calling 'nft -f /etc/nftables/main.nft'.
# Note about base chain priorities:
# The priority values used in these sample configs are
# offset by 20 in order to avoid ambiguity when firewalld
@timothyham
timothyham / ipv6guide.md
Last active October 1, 2025 14:10
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@jirawan-chuapradit
jirawan-chuapradit / hello_handler.go
Last active June 17, 2024 19:18
This code snippet demonstrates how to set up OpenTelemetry in a Go application
package handlers
import (
"context"
"io"
"net/http"
"github.com/jirawan-chuapradit/tracing-go/service"
"github.com/rs/zerolog/log"
"go.opentelemetry.io/contrib/bridges/otelslog"
@cyrex562
cyrex562 / nftables.conf
Created May 19, 2024 14:37
nftables example
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0; policy drop;
ct state invalid counter drop comment "early drop of invalid packets"
ct state {established,related} counter accept comment "accept all connections related to our sessio>
iifname "tailscale0" accept
@macrat
macrat / 0_README.md
Created April 29, 2024 11:31
A simple search query parser

A simple search query parser

Supported syntax:

  • and (a b, a AND b)
  • or (a OR b)
  • not (NOT a)
  • grouping ((a))
@rain-1
rain-1 / On Llamafile.md
Last active June 25, 2024 14:31
On Llamafile

On Llamafile not making sense

The LLamafile project doesn't make sense.

The claim is that it is "bringing LLMs to the people", but you could already run an LLM - which is a large binary file containing lots of floating point numbers - by using llama.cpp.

Llamafile joins a compiled binary program to run LLMs with a weights binary into a single file. This isn't a useful goal. you could simply distribute a zip containing an .exe and a weights file together. Or better still: Decouple the program that runs these chatbots from the chatbot weights.

Imagine if PNG files were also an executable that could pop open a window that displays a PNG on your computer. There is a reason we don't do this: It's not good engineering.

@karitham
karitham / requestIDHandler.go
Created April 2, 2024 07:59
slog handler that pulls request id from context and adds it to traces
package http
import (
"context"
"log/slog"
)
// RequestAttrGrabber adds an attribute to each row produced by the logger when it can
type RequestAttrGrabber struct {
Sub slog.Handler