Skip to content

Instantly share code, notes, and snippets.

View shoenig's full-sized avatar
🪁
lets Go

Seth Hoenig shoenig

🪁
lets Go
View GitHub Profile
@shoenig
shoenig / socials.txt
Created September 18, 2025 12:16
limited social media blocklist
# Title: StevenBlack/hosts extension social
#
# This hosts file is a merged collection of hosts from reputable sources,
# with a dash of crowd sourcing via GitHub
#
# Date: 15 September 2025 15:04:12 (UTC)
# The unified hosts file was not used while generating this file.
# Extensions used to generate this file: social
# Number of unique domains: 3,242
#
@shoenig
shoenig / job.hcl
Created November 14, 2024 16:45
nomad connect exec2 countdash
job "countdash" {
group "api" {
network {
mode = "bridge"
}
service {
name = "count-api"
port = "9001"
@shoenig
shoenig / Hello.java
Last active October 9, 2024 14:15
hello world in java
public class Hello {
public static void main(String[] args) {
System.out.printf("hello!\n");
}
}
@shoenig
shoenig / Caddyfile
Last active October 6, 2024 18:10
homelab files october 2024
{
email [email protected]
storage file_system {
root /var/local/caddy
}
# Staging CA
# acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}
@shoenig
shoenig / blockreddit.txt
Last active June 24, 2025 14:09
reddit domains dns blocklist
0.0.0.0 activereddit.com
0.0.0.0 alienblue.com
0.0.0.0 alienblue.org
0.0.0.0 alienreddit.com
0.0.0.0 alphareddit.com
0.0.0.0 artreddit.com
0.0.0.0 askbyreddit.com
0.0.0.0 astroreddit.com
0.0.0.0 autoreddit.com
0.0.0.0 avatarsreddit.com
@shoenig
shoenig / hclfmt.nomad.hcl
Created June 6, 2024 19:17
seths traefik job file june 2024
job "hclfmt" {
datacenters = ["nyc3"]
type = "service"
group "format" {
network {
mode = "host"
port "http" {
host_network = "internal"
}
@shoenig
shoenig / codec.diff
Created October 10, 2023 15:48
codec diff
➜ diff main/codecgen-pkg-100.generated.go numa/codecgen-pkg-100.generated.go
1018c1018
< var t198 RaftServer
---
> var t198 NUMA
1023c1023
< var t199 RaftConfigurationResponse
---
> var t199 LegacyNodeCpuResources
1028c1028
@shoenig
shoenig / a.diff
Created October 3, 2023 14:51
cluster id
diablo nomad.ent/nomad on main [m]
➜ go test -tags=ent -v -run _UpgradeMigration
=== RUN TestAutopilotEnterprise_UpgradeMigration
CLUSTERID id=a59eb8bb-556c-186c-48ec-80effdbca495 error=<nil>
--- PASS: TestAutopilotEnterprise_UpgradeMigration (0.33s)
PASS
ok github.com/hashicorp/nomad/nomad 0.353s
diablo nomad.ent/nomad on main [m]
➜ git diff
@shoenig
shoenig / cgdump.sh
Created August 18, 2023 18:23
script for inspecting nomad cgroup partitions
#!/usr/bin/env bash
root=/sys/fs/cgroup
echo "[root]"
echo " cpuset.cpus.effective: $(cat $root/cpuset.cpus.effective)"
echo ""
echo "[nomad.slice]"
echo " cpuset.cpus.partition: $(cat $root/nomad.slice/cpuset.cpus.partition)"
echo " cpuset.cpus: $(cat $root/nomad.slice/cpuset.cpus)"
@shoenig
shoenig / eg.json
Created March 27, 2023 16:04
json example
{
"JobHCL":"variable \"X\" {\n type = string\n}\n\nvariable \"Y\" {\n type = number\n}\n\nvariable \"Z\" {\n type = bool\n}\n \njob \"demo\" {\n type = \"sysbatch\"\n group \"group\" {\n task \"task\" {\n driver = \"raw_exec\"\n\n config {\n command = \"echo\"\n args = [\"X ${var.X}, Y ${var.Y}, Z ${var.Z}\"]\n }\n\n resources {\n cpu = 10\n memory = 16\n }\n }\n }\n}\n",
"Variables": {
"X": "x",
"Y": 42,
"Z": true
},
"Canonicalize":true
}