Jun 07, 2023
This week I finally got a machine that is solely to run pfSense.
I didn't want to spend _too_ much money so I bought a $200.00 Qotom Firewall Q330G4.
This was great and easy to set up.
First I bought a Netgear WAC104 and installed OpenWRT on it. Simple enough.
Then I put that into bridge mode, so it's just an Access Point and not a "smart" router too.
Then I put my Linksys EA9300 into bridge mode and behind the pfSense machine (into a switch) and couldn't access any of my server's sites.
After futzing with that for a couple days, I finally figured out the problem.
I thought I was behind a double NAT, but I wasn't. When I moved my EA9300 from my sole WiFi router, to behind the pfSense machine, I neglected to change some settings on my AT&T modem.
You see — dear reader— when I set up this network on my AT&T Modem, I had to enable Passthrough mode.
This, was set to a MAC Address, not an IP Address.
So when I was making sure to keep my IP network on the same 192.168.1.1/24, I thought that was all I needed.
Alas, there's a dropdown to pick the MAC address of the machine that everything passes through.
I can now access my bookmarks, notes, ebooks, and plex server!
Thanks to my friend Daniel (@sanitybit) - who was a great rubber duck and gave me some pointers when I was debugging, and also helped me find the hardware for the pfSense box!
May 26, 2023
I haven't had much time lately for blog posts, I've been dealing with bed time routines with my newborn, and once those are done, I get a few hours of alone time for computer things.
Lately I've been toying around with Amiga OS, FreeDOS, Windows 95, and Apple IIe things.
I got a raspberry pi and installed Pimiga, got a fun set up and that was neat. I then installed Amiberry on my macbook, with some remote hard drive images on my samba share, and I have a consistent setup for Amiga on any machine in the house or on tailscale.
I then decided to install FreeDOS to a barely used Dell Vostro 1720 and install to that. It works great, I have WordStar, TurboC, and more installed and it's fun to get back to my roots in that way.
After that I decided to install Windows 95 with 86Box, did the same with remote hard disk images, and got that running. Been toying around in Visual Basic 6, Oh the memories!! I installed that so I could play Lego City, but having voodoo graphics errors I need to figure out before I can play.
I also ordered an Apple IIe emulator machine that runs on an Esp8266 from CT6502 and it works great. So cool just tossing a disk image on the MicroSD card and loading it up. The downside to this is I can't figure out how to swap disks in realtime, so I can't play Ultima, or any multi disk games. I can however load .hdv files so if something comes with a hard disk image.
Not really much for a tech post, and nothing to share codewise, but thought I'd break some radio silence. I also imported my flying blog here, so I added the Flying category/tags.
May 26, 2023
I made a mistake with not reading CHANGELOGs for all my packages in Neovim this week. This sent me down a small rabbit hole trying to fix all the things.
What happened is I ran :PackerUpdate which, pulls the latest version of Packer packages, good, updates! But... Telescope has a new requirement on main branch that requires Neovim 0.9.0. The problem is that the latest NixPkgs for Neovim right now is 0.8.1. I ran to google, tried to set an overlay to use neovim-nightly, but that didn't work. If you recall in Dotfiles - My 2022 Way I'm not actually using NixOS so (please correct me if I'm wrong) overlays don't work. I tried specifing a version in my programs.nix, I tried a bunch of other things at 1AM that I don't remember anymore.
Almost ripped it all out just to use Nvim 0.9.0 on this machine until NixPkgs has updated the repo. I decided that was the wrong idea, and went to sleep.
Tonight, I was able to figure out that in Packer, you can pin a commit!
It's clear in the docs, but I was trying to fix it at the Nix level, so I didn't immediately think of this, even though at my last job, Tidelift, I was doing package pinning analysis! Derp.
So, I added commit="c1a2af0" to my use statment in plugins.lua and Telescope started working again without a warning, or issue. Commit.
That wasn't the only problem though. In my infinite wisdom, I followed some reddit posts that I won't link to, that suggested deleting ~/.local/share/nvim and rerunning PackerInstall, the problem there -- my tree-sitter configs are in my nix files.
This is an issue I need to look at later, but in my programs.nix file, I some reason have two entries of plugins =. I had to uncomment the first one where I inject tree-sitter, and comment out the second setting. Then rebuild my nix flakes.
After that,I had to comment the first, uncomment the second, and rebuild with withAllGrammars config.
This worked, I had my rust tree-sitter configs working, but was missing rust-analyzer.
That's in Mason! So I ran :Mason, found rust-analyzer slapped that i button, and I finally had my system back after 2 days of issues.
This was mostly a blogpost so I can reference back to it in the future, but hopefully at least _someone_ learns to pin your dang nvim Packages!
May 26, 2023
I have to use LastPass at work, and I store some API keys in there. Rather than copy/paste and have the actual api key on my terminal, I like to use read -rs ENV_VAR_NAME to set environment variables, so they are hidden from scrollback.
Recently my coworker set something up that we need an environment variable set up for running some Terraform commands. I don't feel like pasting it in every time from LastPass, so I figured out how to set this up and automate it. I'm sure I've already talked a lot about how I love direnv and I maintain a lot of different .envrc files for work things. For my last team I had one per repo! Well direnv comes to the rescue again.
- The first step is installing the lastpass-cli.
- Then you need to set it up so you log in, how you do that is up to you. I have lpass checking status, and if it exits nonzero, then running lpass login again in my direnv.
- After that you can use lpass show and capture that in a variable to export your API key as an environment variable.
lpass status
if [ $? -ne 0 ]; then
lpass login email@address.com
fi
export API_KEY=$(lpass show "Secret-Name-Here" --password)
Example .envrc file.
I love automating things, and when a coworker says "oh no we have to do this"... I run to automate it!
Apr 04, 2023
My friend Nik showed me his /now/ page, and I find that a cool idea.
This blog is more of a technical braindump than a log of my personal life, so I don't really talk about my life much.
I assume no one will visit https://tyrel.dev/now but if you do, you will see a handcrafted update of my life and what has happend with me lately.
Thanks to Derek Sivers for setting up a network of /now/ pages! https://nownownow.com/.
Mar 28, 2023
Per my last post, I did not succeed in cleaning off the malware.
That machine is dead and I am now running on a $4/mo Digital Ocean droplet - much less power than before, but I don't really need it anymore now that I have my own server at home.
I am sad I don't have a Pixelfed anymore, maybe I'll relaunch it some day.
Mar 14, 2023
This morning I woke up to an email from DigitalOcean saying they have scanned my host and on port 8080 was botnet.
"We are writing to let you know that your Droplet tyrelsouza.com at 138.197.14.67 is a Command & Control server part of a botnet."
UGH. This is not what I wanted to have to deal with today.
My first steps were to shut down all php things (the issue is with heysrv.php in EVERY directory). Then I ran find / -name heysrv.php -delete to delete all the files. After this, I decommissioned my pixelfed instance (rip pix.tyrel.dev) and disabled the startup scripts for that.
I then installed Simply Static on my one remaining wordpress and turned that into a static collecton of html and related files. This elimiated two php instances. With one more remaining - my Mediawiki server.
I found an Export Pages link and now have an XML file of all my pages (only 78 or so) and can start working on putting this back to html notes on my joplin tool, instead of my wiki. Before I shut it down for good, I need to extract all the images, that's the only thing that's left to keep this knowledge secure.
Now the only thing left on this server is this static blog, pushed up from pelican. Everything else on this machine is just index.php files that redirect around (example https://tyrel.bike/ to my Strava)
It's a bit sad I had to do this today, when I have other things I want to deal with - but DigitalOcean gave me a 24 hour ultimatum. I'll rebuild this server later, but for now, blog on!
Jan 31, 2023
As I mentioned in my December post I'm doing a 6502 course on Pikuma.
I'm about 75% of the way done, and I think I need to circle back to some earlier stuff about how the PPU works, but it's super fun.
Over the holidays I was able to stop at my father's and pick up my old NES.
I swapped out the ZIF connector for a new one, and cleaned up some contacts on the RCA ports, and it works great!
Once I found out that it was working - I played Sesame Street ABC 123, as that's the only one I had up in my office - I ordered an EverDrive N8.
That came last week.
The pictures are tall due to how I took them, so sorry I'll attach them at the end of the post.
Once I got the EverDrive N8 I made sure it worked by playing a Battletoads ROM.
Battletoad tested - I then copied Atlantico.NES to my Everdrive.
Atlantico is the game that Gustavo is walking us through making in the current part of the course - not a real published game.
I loaded it up and HOLY COW - something I actually wrote in Assembly is running on real hardware.
If you want to watch the video, it's very simplistic at the 75% mark, this was before the Collisions chapter, and no sound yet.
The feeling of getting something running, locally, and seeing it working on screen, despite being a programmer for ~~20 years, is AMAZING.
Writing code that executes on the system you grew up playing the early 90's, wow.
I do wish the CRT TV my wife had was square, things get cut off on it.
I even got a remote, so I could try to fix that in the menu, alas, only picture option is brightness.
(Not that I realistically thought I could scale it, CRT Pixels are only Pixels.
Picture Gallery
Trying out putting all the pictures at the end of my posts, if they are not directly related to paragraph content.
Jan 17, 2023
This weekend I purchased a book from this seller on Craigslist - "Advanced MS-DOS Programming: The Microsoft Guide for Assembly Language and C Programmers" and before opening it, I wanted to get a C environment running.
I found a copy of TurboC2 on Archive.org and tossed that into my DOS Box install. I wrote a "Hello world" and pressed compile and it couldn't include "stdio.h", what the heck?
It seems that the Archive.org copy of Turbo C 2 ships with configuration that sets where the Includes and Lib directories to C:\TC. I keep all my programs in C:\PROGS so of course it can't find any header files for me!
To fix this you can either move your TurboC install to C:\TC, which feels wrong to me, or you could configure it in the options properly.
Steps
- Go to the Directories entry in the Options Menu.
- You can see the default provided configuration directories
- Fill out your appropriate directories for all three of the options.
- Make sure all three are configured properly.
- Then you can save your config, so you only have to do this once.
The Screenshot Way
Unfortunately - this file is a binary file. You can't just edit it in a text editor and carry on, so this is the only way I know how to change these locations.
Hopefully this helps anyone else who runs into any include errors with Borland Turbo C 2!
Jan 10, 2023
New Year's eve eve, my main portable computer crashed. Rebooting to Safe mode, I could mount this MacBook's hard drive long enough to SCP the files over the network to my server, but I had to start that over twice because it fell asleep. I don't have access to rsync in the "Network Recovery Mode" it seems - maybe I should look to see if next time I can install things, it's moot now.
I spent all January 1st evening working on learning how Nix works. Of course, I started with Nix on macOS (intel at least) so I had to also learn how nix-darwin works. I have my dotfiles set up to use Nix now, rather than an INSTALL.sh file that just sets a bunch of symlinks.
I played around for a litle bit with different structures, but what I ended up with by the end of the weekend was two bash scripts (still working on makefile, env vars are being funky) one for each operating system rebuild-macos.sh and rebuild-ubuntu.sh. For now I'm only Nixifying one macOS system and two Ubuntu boxes. Avoiding it on my work m1 Mac laptop, as I don't want to have to deal with managing synthetic.conf and mount points on a work managed computer. No idea how JAMF and Nix will fight.
My filetree currently looks like (trimmed out a host and a bunch of files in home/)
.
├── home
│ ├── bin/
│ ├── config/
│ ├── gitconfig
│ ├── gitignore
│ ├── gpg/
│ ├── hushlogin
│ └── ssh/
├── hosts/
│ ├── _common/
│ │ ├── fonts.nix
│ │ ├── home.nix
│ │ ├── programs.nix
│ │ └── xdg.nix
│ ├── ts-tl-mbp/
│ │ ├── brew.nix
│ │ ├── default.nix
│ │ ├── flake.lock
│ │ ├── flake.nix
│ │ ├── home-manager.nix
│ │ └── home.nix
│ └── x1carbon-ubuntu/
│ ├── default.nix
│ ├── flake.lock
│ ├── flake.nix
│ ├── home-manager.nix
│ └── home.nix
├── rebuild-macos.sh
└── rebuild-ubuntu.sh
Under hosts/ as you can see, I have a brew.nix file in my macbook pro's folder. This is how I install anything in homebrew. In my flake.nix for my macos folder I am using home-manager, nix-darwin, and nixpkgs. I provide this brew.nix to my darwinConfigurations and it will install anything I put in my brew nixfile.
I also have a _common directory in my hosts, this is things that are to be installed on EVERY machine. Things such as bat, wget, fzf, fish, etc. along with common symlinks and xdg-config links. My nvim and fish configs are installed and managed this way. Rather than need to maintain a neovim config for every different system, in the nix way, I can just manage it all in _common/programs.nix.
This is not "The Standard Way" to organize things, if you want more inspiration, I took a lot from my friend Andrey's Nixfiles. I was also chatting with him a bunch during this, so I was able to get three systems up and configured in a few days. After the first ubuntu box was configured, it was super easy to manage my others.
My home/ directory is where I store my config files. My ssh public keys, my gpg public keys, my ~/.<dotfiles> and my ~/.config/<files>. This doesn't really need any explaination, but as an added benefit is I also decided to LUA-ify my nvim configs the same weekend. But that's a story for another time.
I am at this time choosing not to do NixOS - and relying on Ubuntu for managing my OS. I peeked into Andrey's files, and I really don't want to have to manage a full system configuration, drivers, etc. with Nix. Maybe for the future - when my Lenovo X1 Carbon dies and I need to reinstall that though.