Skip to content

Instantly share code, notes, and snippets.

View CosmicToast's full-sized avatar

Chloé Vulquin CosmicToast

View GitHub Profile
@CosmicToast
CosmicToast / README.md
Last active December 28, 2023 12:29
FirewallD Files

Helpful FirewallD Files

Services

Place these in /etc/firewalld/services/.

@CosmicToast
CosmicToast / set.go
Last active January 2, 2024 19:00
go-collect
package collect
// Set represents a generic set of comparable elements.
type Set[T comparable] map[T]struct{}
// Has checks whether the set holds a given value.
func (s Set[T]) Has(v T) bool {
_, ok := s[v]
return ok
}
@CosmicToast
CosmicToast / log.sh
Last active February 14, 2024 21:53
POSIX sh stack-based logging system.
#!/bin/sh
# this file is licensed under any of the following SPDX licenses
# to be chosen by the user:
# * 0BSD (https://spdx.org/licenses/0BSD.html)
# * BlueOak-1.0.0 (https://blueoakcouncil.org/license/1.0.0)
# * CC0-1.0 (https://creativecommons.org/publicdomain/zero/1.0/)
# * Unlicense (https://unlicense.org/)
## log.sh - Bunker Log
# This is the bunker logging system for POSIX sh.