A tour of FreeBSD in 2022

Why Handy resources Talks Factoids Things that feel different Software management and ports Ports patching init system coreutils Scheduling Block devices My setup NFS xorg dwm st powerd++ ntp fonts Why Mostly curiosity. I’ve been a GNU/Linux and free software enthuiatist since the late 90’s and that’s not about to change. More concrete reasons: GNU/Linux won the war. However… The Berkeley Software Distributions are family of open UNIX-like operating systems with lineage back to AT&T UNIX They come as complete and cohesive systems, not a distribution of disparate pieces The BSD license is wonderfully permissive Bill Joy (the father of Sun, BSD, vi, RISC) Marshall Kirk McKusick ZFS, DTrace and Clang It feels so damn neat, tidy and robust It wont be my daily driver, however it’s nice to be aware of what {Free,Open,Net}BSD each bring to the table Handy resources FreeBSD Handbook FreeBSD Porters Handbook FreeBSD Wiki Freshports the place for ports and most recent commits bsd-hardware.info papers.freebsd.org the collected works of the FreeBSD community as presented at various conferences and summits Talks Using boot environments at scale - by Allan Jude The ZFS Filesystem workshop - by Philip Paeps Factoids The term daemon comes from Greek mythology and represents an entity that is neither good nor evil, and which invisibly performs useful tasks. This is why the BSD mascot is the cheerful-looking daemon with sneakers and a pitchfork. Things that feel different My Linux biases are deep rooted. It’s so fascinating to learn how the BSD’s have gone about things differently. ...

April 17, 2022 · 5 min

The Conscience of a Hacker (1986)

This is an amazing piece of hacker folklore was created on January 8, 1986 by The Mentor. Source: http://phrack.org/issues/7/3.html =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The following was written shortly after my arrest... \/\The Conscience of a Hacker/\/ by +++The Mentor+++ Written on January 8, 1986 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Another one got caught today, it's all over the papers. "Teenager Arrested in Computer Crime Scandal", "Hacker Arrested after Bank Tampering"... Damn kids. They're all alike. But did you, in your three-piece psychology and 1950's technobrain, ever take a look behind the eyes of the hacker? Did you ever wonder what made him tick, what forces shaped him, what may have molded him? I am a hacker, enter my world... Mine is a world that begins with school... I'm smarter than most of the other kids, this crap they teach us bores me... Damn underachiever. They're all alike. I'm in junior high or high school. I've listened to teachers explain for the fifteenth time how to reduce a fraction. I understand it. "No, Ms. Smith, I didn't show my work. I did it in my head..." Damn kid. Probably copied it. They're all alike. I made a discovery today. I found a computer. Wait a second, this is cool. It does what I want it to. If it makes a mistake, it's because I screwed it up. Not because it doesn't like me... Or feels threatened by me... Or thinks I'm a smart ass... Or doesn't like teaching and shouldn't be here... Damn kid. All he does is play games. They're all alike. And then it happened... a door opened to a world... rushing through the phone line like heroin through an addict's veins, an electronic pulse is sent out, a refuge from the day-to-day incompetencies is sought... a board is found. "This is it... this is where I belong..." I know everyone here... even if I've never met them, never talked to them, may never hear from them again... I know you all... Damn kid. Tying up the phone line again. They're all alike... You bet your ass we're all alike... we've been spoon-fed baby food at school when we hungered for steak... the bits of meat that you did let slip through were pre-chewed and tasteless. We've been dominated by sadists, or ignored by the apathetic. The few that had something to teach found us will- ing pupils, but those few are like drops of water in the desert. This is our world now... the world of the electron and the switch, the beauty of the baud. We make use of a service already existing without paying for what could be dirt-cheap if it wasn't run by profiteering gluttons, and you call us criminals. We explore... and you call us criminals. We seek after knowledge... and you call us criminals. We exist without skin color, without nationality, without religious bias... and you call us criminals. You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it's for our own good, yet we're the criminals. Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for. I am a hacker, and this is my manifesto. You may stop this individual, but you can't stop us all... after all, we're all alike. +++The Mentor+++

April 13, 2022 · 3 min

Talks that changed The way I think about programming

Oliver Powell put this amazing original list together in 2016. While I didn’t appreciate the gravity of the list at the time, the talks have actually changed how I think about programming. Each of the presenters is not only incredibly intelligent but they have some serious credentials and achievements behind them. They in essence have much wisdom to impart. For example Rich Hickey, the creator of Closure, is brilliantly articulate and thought provoking. ...

March 14, 2022 · 7 min

Cyber Defence Operations

Semester 1 2022 has snuck up on me again. This semester as part of the UNSW and ADFA run Master of Cyber Security degree, I’m taking the blue team core unit ZEIT8026 Cyber Defence - Network Security Operations (SecOps) lectured by Dr Waqas Haider and Dr Nour Moustafa. Unlike its sister red team unit ZEIT8020 Cyber Offense - Cyber Network Operations (CNO) which I took in 2018, ZEIT8026 aims to lay the foundational knowledge of cyber defence operations: ...

March 4, 2022 · 26 min

Default programs based on MIME type with XDG

From an ancient post I previously did…I need to refresh my mind on this topic often enough thought it worthy of breaking it out. How Linux systems figure out what program should open a file Programs that handle arbitrary files (e.g. web browsers, irc clients, file managers) delegate to a general purpose resource handler. XDG MIME Applications is the ubiquitous option here, and is not only an implementation, but a full blown specification. ...

February 1, 2022 · 2 min

Migrating off Google Workspaces (Google Apps or G Suite)

Google Workspace (formally Google Apps, formally G Suite) After years of frustration in the Google platform, specifically G Suite (also known as Google Apps or Google Workspace) it all recently came to a head for me after I received a couple of Google Nest cameras as gifts last Christmas. Having been a strong Google proponent since the late 90’s, when Google was a cool startup bucking the trend with their famous do not be evil mission, Googles brand within the technical community rose to dizzying heights. Ever since the Google brand has always had a strong influence on me and I have happily recommended their products to people I care about. ...

January 30, 2022 · 7 min

DVD backups on GNU/Linux

This is how I like to create digital copies (i.e., backups) of my physical DVD collection, which I own legitimately. I don’t condone piracy or theft. Backup instructions Rip physical DVD media makemkv Transcode mkv to m4v container using Fast 1080p30 preset in handbrake. Passthrough UTF-8 subtitles if you like those. Copy to media backup server rsync --protect-args -av --progress Season8 "shnerg@172.16.1.32:/data/TV/Penn & Teller Bullshit/" Software MakeMKV transcoder that deals with proprietary (and usually encrypted) disc into a set of MKV files Handbrake general video transcoder The C source is available as tarballs makemkv-bin-1.16.5.tar.gz and makemkv-oss-1.16.5.tar.gz. The Linux release includes full source code for MakeMKV GUI, libmakemkv multiplexer library and libdriveio MMC drive interrogation library. ...

January 21, 2022 · 2 min

My Glorious GMMK Pro 75% custom keyboard

Last year I decided in addition to my amazing ErgoDox EZ to look for a 75% layout keyboard (think a more minimal version of ten-keyless). After wasting far too much time on r/MechanicalKeyboards the Glorious GMMK PRO hit my radar. Short for Glorious Modular Mechanical Keyboard, the pro version cuts the previous full sized keyboard version down to a 75% design with a digital rotary dial. GMMK PRO is an ultra premium, gasket-mounted 75% layout keyboard built for enthusiasts, gamers, and professionals. ...

January 13, 2022 · 3 min

Rust cheat sheet (2022)

Please refer to Don Bright’s original rust-lang-cheat-sheet which I based much of this content off, as I work through The Book. Rust in a nutshell Documentation Toolchain Mutability basic Types and variables Operators Run time errors, Crashing, panic, except, unwrap, Option, Result Printing loop, while and for Concurrency, parallel processing Functions and closures Unit tests, integration tests Documentation If, conditionals, patterns, match, control flow Ownership, Borrowing, References, Lifetimes Arrays, Slices, Ranges Structs Enums Collections, Key-value pairs, Sets Macros Little programs Guess a number Cool references Rust in a nutshell Syntax similar to C Ownership of memory enforced at compile time Statically linked Functional-ish, generic-ish, not so objecty Control flow using patterns, match keyword Packages: ‘cargo’ command, https://crates.io Testing: cargo test, #[test] Concurrency: ownership, mutability, channels, mutex, crossbeam + Rayon packages Auto formatter: rustfmt filename.rs Compiler engine: LLVM Raw pointers, low level: unsafe{} keyword Documentation rustup doc for offline docs! doc.rust-lang.org standard library, primitive types, standard macros docs.rs for package documentation Toolchain $ rustup.sh # install rust, see rust-lang.org for details $ cargo new myproj # start new executable project $ cargo new --bin myproj # as above $ cargo new --lib myproj # start new library project $ cd myproj # cd into the new directory $ ls -lR # list our skeleton of files src/main.rs # main.rs, has main() entry point Cargo.toml # Cargo.toml defines packaging $ $EDITOR Cargo.toml # add dependencies and other details $ cargo build # downloads dependencies + builds main.rs $ cargo build --release # release build $ cargo check # make sure code compiles, without binary outputs $ cargo update # ignore Cargo.lock and figure out latest versions $ cargo run # runs program created from main.rs $ cargo doc --open # local web based doc $ cargo test # runs tests (in parallel by default) $ cargo test -- --test-threads=1 # run tests one at a time $ cargo test -- --nocapture # run tests, show output $ cargo run --example fundemo -- --argtodemo # run example with argument $ rustc --explain E0384 # eli5 what an error code means Mutability basic let x = false; // all variable bindings are immutable by default x = true; // compile error: can't change an immutable binding let mut p = false; // "mut" designates a binding as mutable p = true; // ok, mutable binding can change; Types and variables Rust provide two compound types; arrays and tuples. ...

December 11, 2021 · 26 min

st emoji support with libXft BGRA glyph patch

The Problem st crashes whenever an emoji needs to be rendered. It turns out to be an issue with the underlying font rendering library libXft. libXft is the client side font rendering library, using libfreetype, libX11, and the X Render extension to display anti-aliased text. The Solution In its current offical mainline form libXft does not support rendering images. A patch by Maxime Coste exists to add support for BGRA glyphs and scaling, effectively enabling emoji rendering support. ...

December 7, 2021 · 2 min