hazardous

thoughts, things, etc. from andrew snow

welcome to hazardous! although like any personal site it's always a WIP, you can read posts roughly divided up into life (for most things), linux (tech-oriented writing), as well as information about some small projects, and how to get in touch. there's also some audio!! thanks for stopping by!


hazardous summer edition

currently

08.11.21

got my font solution worked out for now... pending a more ruggedized solution to CDN handovers, which is a compromise i am willing to live with.

but that's not even the important news! hazardous is officially trading out the former #00bfff baby-blue and going red! say hello to #eb1f48.

the decision was inspired by a conversation i had with someone over twitter, and is meant to evoke the glory days of multi-color-inked publishing runs, most often seen in more expensive and high-quality works. :)

08.03.21

maintenance

it's never good enough! :)

for some reason, when visiting the about section, fonts were breaking!

i recently updated that page, and i might simply need to do some cleanup. but - it is 5:30am, i just spent the night coding, and my brain is spaghetti. so for now, hazardous x mecha will be rendering fonts using your browser's default sans-serif font.

however, this means if i froze development and minified my style scripting, each hazardous page would weight less than ~100kb. i'm tempted to do this - i would love a custom font but right now it's still too expensive to get the sort of responsive rendering you get with system fonts.

the good news is that this culminates my resolve: it's a good time to hit pause and start cutting away at the cruft. although you see a (blazing fast! standards compliant!) personal website with half-baked bad articles consisting of ill-informed opinions... behind the scenes it is even less organized.

the source code for hazardous is littered with commented out chunks, which is an effect of some of my hoarder tendencies - and almost inevitable as a solo dev with no real version control discipline :) i already know, for a fact, that the difference between my minified and non-minified style.css file is 15kb vs 5kb!! granted, half of that bloat is just formatting cruft like spaces and line breaks, there is still a massive amount of old testing code that wound up being disabled but never reused.

updates

  • on a whim, i changed the Inter font *.woff file's link rel attribute from prefetch to preload, and this seems to have restored full responsiveness to font rendering. of course, this impacts the overall page load speed of the server. (i like to run multiple pages through the speed tests, to make sure that my overall scores are not impacted by pages with more multimedia content - no 'stat padding' here!)

  • since this particular change caused my website to resume normal function, my instict is to assume that my nginx server is failing to successfully prefetch the font file - because of something unique in the way my software builds and serves the 'about' page.

  • everything seems to work without a hitch when i switch to a CDN to provide the fonts, which is unusual. it hints at some sort of internal problem: for some reason the browser isn't loading the fonts from the same server it's loading the HTML from!

  • trimmed my CSS file down to ~7.5kb though :)

  • current suspect is currently nginx. i have several location rules set up to emulate the basic security of an .htaccess file, and may need to tweak them to make sure the server isn't having permissions errors. on top of that i might have misconfigured one of my proxy_pass rules as well. basically - most of my recent work has involved updating not only nginx itself, but my configuration files as well. like my CSS bloat above, my web server files also have alot of old cruft and commented out code that makes everything sort of chaotic, and as a result trying to retroactively pore over configs when something breaks has become a hassle.

a big part of this current effort has been implementing something i have always done in another part of my life, the kitchen: cleaning as i cook, so to speak. throughout this entire bug-hunt, i am also trying to tidy up code so that the next time i have to do this, i'll hopefully have an easier time going through all my code.

07.22.21

hazardous is now http/3 compliant! :)

this required building a dev branch build of nginx, complicated by two things i would have to do: compiling google's open-source boringssl library, and brotli.

#!/bin/bash

# store the current dir
CUR_DIR=$(dirname $(readlink -f $0))

sudo apt install -y build-essential libpcre3-dev libssl-dev cmake meson flex

mkdir factory
cd $CUR_DIR/factory

wget https://hg.nginx.org/nginx-quic/archive/quic.tar.gz
tar xvf quic.tar.gz
git clone https://github.com/google/ngx_brotli
cd $CUR_DIR/factory/ngx_brotli
git submodule update --init
cd $CUR_DIR/factory
git clone https://github.com/google/boringssl

cd boringssl
mkdir build && cd build
cmake -GNinja ..
ninja

cd $CUR_DIR/factory/nginx-quic-quic

$CUR_DIR/factory/nginx-quic-quic/auto/configure --with-debug --with-http_ssl_module       \
                       --with-http_v2_module --with-http_v3_module     \
                       --with-compat --add-dynamic-module=../ngx_brotli \
                       --with-cc-opt="-I../boringssl/include"   \
                       --with-ld-opt="-L../boringssl/build/ssl  \
                                      -L../boringssl/build/crypto"

make && make install

notes: you might have to copy files from the objs/ directory, even after running make install as root. this can be avoided by setting flags in the configuration to account for the way your nginx server files are laid out. regardless, you'll want to make sure the objs/nginx binary replaces the binary located when running echo $(which nginx). additionally, the objs/*.so modules should be moved to a directory your nginx installation auto-loads dynamic modules from.

this build currently powers hazardous. and this page is being served over a QUIC connection!

06.28.21

not too much going on with hazardous. playing around with ergo, seeing about hosting an irc channel. check out my friend's movie review blog!

nothing much behind the scenes. some small updates to cargo bay and my irssi setup. my current mood is "back to basics" so i've just been writing command line programs more, building on that sort of thing.

the most recent [web page test] showed not much needs changing :) A's all across the board, as well as an A+ for my security!

02.23.21

felt productive so i posted some stuff; links up above!

02.21.21

merry new year's! it only took me a handful of months to write this update. been busy in real life, just trying to pay bills and whatnot. haven't done much behind the scenes, besides occasionally tunneling into the server to run updates for debian.

looking to polish a draft i have written on my current stack - still trying to resolve some complex issues i have with regards to microsoft inexplicably surging to the top of the development platform rankings. that being said, writing this update post was as simple as opening VSCode and connecting to this server. upon logging in, this file opened up and i just started typing. after this sentence i will save it, and that is the extent of effort it takes to push written content to a website in 2021.