Skip to content

Instantly share code, notes, and snippets.

View ctsrc's full-sized avatar
🦈

codetrotter ctsrc

🦈
View GitHub Profile
@ctsrc
ctsrc / 00_install_fbsd_14_1_hetzner.md
Last active October 12, 2024 02:54
Install FreeBSD 14.1 on Hetzner

Install FreeBSD 14.1 on Hetzner server

Hetzner no longer offers direct install of FreeBSD, but we can do it ourselves. Here is how :)

Boot the server into rescue mode

Boot the Hetzner server in Hetzner Debian based rescue mode. ssh into it.

The Hetzner rescue image will tell you hardware details about the server in the login banner. For example, with one of my servers I see:

@ctsrc
ctsrc / Leadership-CI.md
Created August 3, 2022 23:59 — forked from simpsoka/Leadership-CI.md
This is a list of questions to check our decision making.

Do I want to die on this hill?

  • Pass: This is morally good and if not handled has long term consequences
  • Fail: This if self serving

Am I including everyone?

  • Pass: My ego is not driving this conversation
  • Fail: The people in this conversation will only tell me I'm right and not push back
@ctsrc
ctsrc / README.md
Last active September 11, 2024 19:51 — forked from niw/README.en.md
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
#!/usr/bin/env bash
#
# Please note: Frame rate of 25 fps is hardcoded.
# Adapt or generalize according to what you need.
#
set -euxo pipefail
echo "$1"
@ctsrc
ctsrc / Caddyfile
Last active April 9, 2024 13:35
FreeBSD 12.0 web server setup
git.example.com {
proxy / localhost:3000
tls {
dns cloudflare
}
}
www.example.com {
root /var/www/com.example/frontend/
@ctsrc
ctsrc / .gitignore
Last active February 19, 2024 01:55
Random dungeon generator from https://news.ycombinator.com/item?id=19309378, deobfuscated, refactored and commented
/.idea/
/cmake-build-debug/
/dungeon
@ctsrc
ctsrc / build.rs
Last active April 6, 2018 14:26
Single-binary website in Rust
use std::env;
use std::fs::File;
use std::io::Write;
use std::path::Path;
// https://doc.rust-lang.org/cargo/reference/build-scripts.html#case-study-code-generation
fn static_assets (mut f_dest: File, const_name: &str, root_dir: &Path, relpath_asset: &str)
{
f_dest.write_all(b"static ").unwrap();