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_0_hetzner.md
Last active May 1, 2024 04:21
Install FreeBSD 14.0 on Hetzner

Install FreeBSD 14.0 on Hetzner server

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

Boot the hetzner server in Hetnzer Debain based rescue mode. ssh into it. then:

wget https://mfsbsd.vx.sk/files/iso/14/amd64/mfsbsd-14.0-RELEASE-amd64.iso

qemu-system-x86_64 \
@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 April 29, 2024 19:18 — 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();