It's All About Open Source

A friend of mine who has been doing some programming (hi, Fy!) recently asked me for some ideas on open source projects they could look at and possibly contribute to. It made me think of what open source software I tend to use on a regular basis… which is a decent amount as someone who runs a few different Linux systems. It seemed like a solid opportunity to compile the Super Official List of Open Source Stuff John Likes™. As someone who doesn’t really know much about writing code, I have no idea if any of these are good candidates for someone to start contributing to open source; they just happen to be things I use on the regular. Without further adieu and in no particular order:

Notepad++

Notepad++ has been one of my favorite Windows text editors for as long as I can remember. While it may not be as flashy or as popular as some of the other editors I’ll get to in a little bit (yeah… I’ve got a thing for text editors), it’s hard to top the speed and footprint of Notepad++. It also has at least basic syntax highlighting for almost every programming language under the sun. I also can’t overstate the importance of being able to open a plaintext file at work and having the editor launch immediately.

Visual Studio Code

VSCode is another rare example of Microsoft software I enjoy. While I dislike the large, clunky IDE that is Visual Studio, VSCode is a nice balance between a simple editor and an IDE. It has a large plugin ecosystem that can give you benefits of things like Intellisense and a debugger without being needless. It’s based on the same Electron framework as GitHub’s Atom editor. I’ve found it to be such a nice editor across a wide array of languages that I’ve even taken to installing it on Linux systems for the times when I want a GUI editor.

If you’re curious how I configure it, here’s my settings.json file. Note that I mainly use it for PowerShell:

{
    "workbench.colorTheme": "Dracula",
    "editor.minimap.enabled": true,
    "editor.minimap.showSlider": "always",
    "editor.wordWrap": "on",
    "editor.scrollBeyondLastLine": false,
    "files.hotExit": "off",
    "powershell.integratedConsole.showOnStartup": false,
    "editor.fontFamily": "'Fira Code', 'Fira Mono', monospace",
    "editor.fontLigatures": true,
    "git.ignoreMissingGitWarning": true
}

Vim

Of course, most of the time when I’m using Linux I’m not using a GUI. I feel at home on the command line, which is good considering I run a handful of headless servers that I only ever access via SSH (which happens to be a great way to mess with scripting or code from a Chromebook if it doesn’t have support for Linux apps yet.) Vim is the de facto CLI editor for me (sorry Emacs users), and I can install it on literally everything. Most Linux distros also come with either it or Vi installed by default, so it’s ubiquitous.

Vim has a reputation for being difficult to use, but I don’t really think that’s the case. It’s just that it’s very different to use if you’re coming from most modern editors. Once you get accustomed to it, I’ve found it to be perhaps the most easy for editing text effectively. Plus, it has a rich plugin ecosystem for things like syntax highlighting and support. I use Pathogen as my plugin manager for Vim.

If you want to know my Vim config, this is my typical .vimrc file:

execute pathogen#infect()
set hlsearch ignorecase smartcase incsearch relativenumber ruler
set laststatus=2 tabstop=4 shiftwidth=4 expandtab notitle
syntax on
filetype plugin indent on

htop

htop is a super handy, interactive utility for seeing what the heck is happening in a Linux system. Think of it like the terminal version of the Windows Task Manager. It gives you a nice breakdown of CPU, RAM, and swap usage along with a listing of processes and what each is doing. It also offers and easy way to adjust the nice level of particularly important or greedy processes. It’s an enhancement over the older top utility.

Screenshot from 2019-05-06 17-32-51.png

tmux

tmux is terminal multiplexer, hence the name. If you have no clue what that means, it allows you to take a single terminal and divide it up into multiple virtual terminals. This lets easily have multiple terminals on the screen at the same time with different information on them without having to flip between tabs. Here’s a sample:

Screenshot from 2019-05-06 18-16-41.png

In a single terminal window I’ve got Vim open with some simple Go code on the left pane. The right side has two panes; the top pane has Cowsay running while the bottom pane I just used to install Cowsay. While not exact useful in the scenario I set up for this screenshot, it can be really handy for doing something like writing a script in one pane and having a second, smaller pane to the side or top of running it periodically without ever needing to close the file.

The other super handy part of tmux is that you can keep a persistent session going on a remote system without staying connected to it. I can SSH to a server, open tmux, connect to an IRC server, and use it for however long I need. If I want to disconnect from SSH but keep my IRC session going, I can simply detach my current SSH session from tmux but leave tmux running. Then I can close my SSH session. When I later SSH into the system again, I can reattach to the existing tmux session and pick right back up where I left off.

PowerShell

Since I’ve mentioned code a few times in these examples after starting the post off by saying I don’t know what the hell I’m doing when it comes to writing code, PowerShell is the one exception. I basically live in a PowerShell window for work, using it for both my day-to-day management at the CLI and in scripts that I use to automate my work… because work smart, not hard, right? I feel decently proficient with PowerShell, and I’m excited that version 6 is now open source! It’s nice to be able to use the same scripting language and commands to manage Windows servers at work that I use to manage my Linux servers at home.

I haven’t posted anything new in a while (I’ve written tons of stuff but just haven’t thought to post it), but you can see some of my sample PowerShell scripts over on GitHub. I’ve also posted some /r/DailyProgrammer challenges as Gists.

Hugo

Hugo is a static site generator. The concept is that instead of needing a CMS (content management system… think something like WordPress) to manage posts, pagination, design, etc. on a website that you can instead do it all via plaintext. Hugo allows you to have HTML templates, CSS, and then posts that are authored as Markdown. When you make a new post or change the site in any way, you can recompile your site which is then output as simple HTML and CSS that you can throw onto a web server. New post? Recompile the site and just move the files. Hugo worries about things like how many posts there should be on a page and will adjust it all for you. Need to change information in your header? Just change it one time in your template file and then recompile; there’s no need to use sed through every page and change each of them.

There are plenty of other static site generators out there (Jekyll is a popular one), but I’ve found that Hugo is by far the fastest. When your site starts to get large with a lot of pages to parse and generate, generators like Jekyll — which is written in Ruby, an interpreted language — can start to bog down. Hugo is written in Go; it’s literally one binary, and that allows it to be super speedy even when your site is large.

NetHack

To end the post on a fun note, NetHack is an incredible video game. It’s easy to look at it and assume that it’s a simplistic, basic game. It runs in a terminal (though variants with tiles and graphics do exist), and everything in the game is represented as an ASCII symbol. Your character? The @ symbol. A kobold? The letter k. The game is also crazy old… it was released in 1987. Here’s what it looks like:

Screenshot from 2019-05-06 18-38-44.png

It’s a fantasy game so the whole point is to hack-and-slash your way through a procedurally generated dungeon, meaning no two games are the same since each level is random; on top of this is the fact that there are more classes, races, and mechanics than most modern games have.

Even better is that the game is still being updated. The latest commit on their GitHub repo was yesterday. Pretty nuts. The game is also a marvel of what’s possible in the C programming language. Imagine making something like this without even being able to use objects.

NetHack exists for every operating system on the planet, but if you don’t want to bother with installing it you don’t have to. You can instead just hop on the alt.org NetHack server.

There are, of course, tons of other open source applications I use on the regular — I didn’t even bother getting into operating systems — but these are the ones I use the most frequently and enjoy the most. The most important thing, though… is to stay pink!

Microsoft Edge Insider: It's Actually Not That Bad

If you happened to listen to our Introduction Episode of the podcast, you’ll know that Brandi and I are sysadmins who work together in a highly Microsoft-centric environment. Essentially all of the servers we manage run some flavor of Windows, we make heavy use of Office 365 and Azure, and both of us spend our entire day either typing email into Outlook or commands into PowerShell.

You may read that and think, “Wow, they really like Microsoft stuff.” At least for me (John, if that’s not clear by now) that’s not the case. I tend to be extremely critical and frequently frustrated with a lot of Microsoft’s offerings. I’ve poured a healthy bit of salt into the Internet over the years at Microsoft’s expense. I could even share some of my more recent frustration with Microsoft products if it wouldn’t spoil what will likely be content for a near-future podcast episode. Suffice to say, there’s a reason one of my former coworkers threw together this image… that’s my face on the can if you’re confused.

morton.PNG

And there’s a reason why I made this image at one point. Cut me some slack… I didn’t really know how to use GIMP that well at the time.

admiral_o365.png

That being said, I’m all about trying the new hotness where software is concerned, so I decided to install the new Microsoft Edge Insider build on my work machine. If you haven’t been keeping score at home, Microsoft essentially admitted that the current, production version of Edge that ships with Windows 10 is a disaster. No one uses it according to every metric, despite Microsoft’s attempts at forcing it on users. They also accepted that their rendering engine under-performed. Perhaps the biggest problem, though, was how the Edge browser was inextricably tied to the underlying operating system, meaning that Edge essentially only got updates during Microsoft’s major updates to Windows 10. Going 6+ months between browser updates is a pretty massive blow when competitors are releasing new versions every month.

The new builds of Edge are based on the open-source Chromium project. While perhaps most notably serving as the underpinnings for Google’s behemoth of a browser that has come to dominate the web, Chrome, it’s also come to serve the same function for plenty of other noteworthy browsers, such as Opera and Brave.

So I threw the Insider build on my work PC to check it out. If you happen to be curious, you can install it alongside the current version of Edge. The icon looks the same but has a green “Dev” stamp over the blue “e”. If you fire it up, it looks essentially like what you’d expect to see opening the current version of Chrome. You get the option to sign in with a Microsoft account, though, rather than a Google account. The various options and settings have been changed up in how they appear, but they’re basically all the same. If you’d like to use an extension, you can select from a subset of Chrome extensions that are currently working with this build of Edge in Microsoft’s own gallery; I’ve read that they’re working to make every extension supported by Chromium and Chrome work with Edge eventually. I was just happy enough that I could get uBlock Origin.

edge_chromium.png

I’ve been running with it as my default browser for a couple of weeks now, and I have to admit that I haven’t run into any issues yet. Everything just works the same as I’d expect, only with a bit of a smaller footprint than with Chrome. I assume this is due to all of the Google services Microsoft ended up removing. If so, it almost reminds me of how Firefox was before the Electrolysis rebuild, where it had become a bit slow and clunky due to bloat. Or how Opera was back in the day when the browser featured a mail client, IRC client, toaster oven, vacuum cleaner, etc. A good feature purge isn’t necessarily the worst thing to happen to some software projects as they expand over time.

Speaking of Firefox, one of the downsides to this is the fact that it means yet another browser is now based on Chromium. Outside of looking as extremely niche browsers, this means that Firefox is now the only non-Chromium-based mainstream browser. That’s a sticky situation since it means that a single project (Chromium) can essentially dictate the growth and direction of the web if they so choose. If that project opted to move away from established standards to do their own thing, for example, no one would be able to ignore that many impacted users. Switching to a Chromium base is a situation that I would describe as good for Microsoft and extremely bad for the web as a whole.

And if you’re one of the three people in the world using the current stable version of Edge with Windows 10 and you’re mad that it will be going away, please just read this article about a nasty Edge vulnerability that Microsoft has declined to patch. Then please stop using that browser.

Unusually Pink Peripherals: Razer Quartz 2019

Given the name of this site and what I said in the first post, you can probably guess that I’m a fan of things which are unusually pink. That’s why last year when gaming peripheral maker Razer announced a line of pink products under their new Quartz branding, I was stoked. I immediately ordered both their keyboard and their mouse. The Quartz products generally aren’t brand new; they’re a pink take on existing products. The first keyboard was a Razer Blackwidow Tournament Edition with Razer Green switches (their equivalent of Cherry’s MX Blue line of clicky, tactile switches.) It’s great, and I still use it daily:

2019-02-07 17.03.24.jpg

The mouse was a bit less exciting as it was a pink variant of the Razer Lancehead. The Lancehead isn’t a bad mouse, but it’s not what I’m really looking for as far as gaming goes. It’s a relatively flat mouse with small, squishy side buttons. I used it for a while but eventually switched to a different mouse.

I was happy with my purchaes, but just last week Razer announced updates across their Quartz lineup. I once again had zero self control and immediately purchased the new keyboard and mouse.

Razer Huntsman Quartz

This keyboard was exciting because, along with being pink, it’s based on the Huntsman. That’s Razer’s first keyboard with their new optomechanical switches. Rather than being completely mechanical, these switches use the same mechanical feel to allow a beam of light to pass through it and be detected by a sensor on the opposite of where it is generated. That light hitting the sensor triggers the actuation of the switch rather than a metal contact. I’m not pro gamer, so I can’t honestly say if I feel any difference in the speed or accuracy of actuation, but I do have to admit that the whole thing is cool as hell. On top of that, every single switch has a metal stabilizer to ensure each key gives a solid, consistent press. That’s normally something you only see on larger keys like the spacebar, Shift, Enter, etc.

2019-03-27 08.56.07.jpg

The keys aren’t embedded into a base for the Huntsman; they sit flat on the board. I really like this style, and it looks great. The keys all have a beautiful, smooth, soft pink finish that looks great. The board itself has the same finish, which is a welcome improvement from the Quartz version of the Blackwidow Tournament Edition. That board had the same key finish but something that felt like a soft-touch powder coating on the board itself. While it had a decent texture, it also seemed like something that could scratch off in an accident. My board actually came with a tiny nick in that coating above the function keys.

I was a little leery about spending so much on a keyboard when I didn’t even know if I’d like the switches, but typing on them is a downright joy. Every key stroke just feels good. Their actuation force of 45 grams is a little lighter than Razer Greens that clock in at 50 grams. I was surprised, though, that after a weekend of gaming on the optomechanical switches, typing on Razer Greens actually felt heavy to me. 45 grams feels like the sweet spot where the switches are easy to press, but not so easy that you could do it on accident. The tactile feedback also removes any doubt of whether or not the switch actuated. On the whole, I adore these switches.

I do wish there was a TKL variant since I don’t really need the number pad on my gaming keyboard. I had to move the keyboard further left to keep the same amount of space on my mat for the mouse, but it’s still comfortable to keep my left hand on WASD.

Razer Basilisk Quartz

The mouse was also a very nice improvement for the Quartz line. This variant is based on the Razer Basilisk, which is an FPS-centric mouse. I appreciate the fact that it has a very large hump behind the buttons, meaning that even with my relatively large hands I can palm the mouse without my hand touching the mat. The rubber grips around the sides are super nice and have a good feel to them. The scroll wheel features adjustable tension, handled via a small wheel on the underside of the device. You can go all the way from extremely rough, tacticle clicks for each scroll to free scrolling. I found a very low amount of tension to be the best for me.

The side buttons have a good feel to them, though the true boon for this mouse is the DPI clutch just in front of them. The clutch can be configured to decrease your DPI if you need to be precise. For example, you might want to hold in the clutch while sniping in a game to avoid things feeling too twitchy. The button for it is a bit large for my taste, extending just a bit over the first side button. Luckily, this button is removable and comes with a smaller button you can swap in that I greatly prefer. If you have no interest in the clutch, you can also replace it with a pink rubber plug that simply fills the hole and matches the rest of the mouse’s exterior.

Given that Overwatch is my game of choice at the moment, the Basilisk feels like the perfect mouse. It pairs nicely with the Huntsman, and I’ve been really enjoying these preferals across a variety of games like Overwatch, Diablo 3, and Elder Scrolls Online. To be perfectly honest, I’d have kept them no matter what just because, well… they’re pink. I’m actually extremely happy with both of them, though, as they’re high quality products that deliver a high quality experience. Many pink computer accessories are pretty much hot garbage because the gimmick of being pink is the selling point, not the quality. With these two devices, though, you absolutely get both the performance and the color. If your battlestation needs a little more pink and you’ve got the spare money, you can’t go wrong with the current Quartz lineup.

Firebase Update Control Error

One of my websites (not this one) is hosted via Firebase. It’s a largely static site that I rarely need to touch. I manage it from their CLI running on a VPS that I do some coding on so that I can access it regardless of which of my numerous devices I happen to be using. Since I don’t touch the site regularly, though, the Firebase tools tend to get a bit out of date. I needed to push a minor change the other day and figured I’d check for an update:

sudo npm install -g firebase-tools

Instead of completing happily, though, I got the following:

npm ERR! path /usr/local/bin/firebase
npm ERR! code EEXIST
npm ERR! Refusing to delete /usr/local/bin/firebase: ../lib/node_modules/firebase-tools/bin/firebase symlink target is not controlled by npm /usr/local/bin
npm ERR! File exists: /usr/local/bin/firebase
npm ERR! Move it away, and try again.

I’m a bit embarrassed that I did a bunch of super unnecessary troubleshooting at first instead of just reading the error. When I finally got to that point because things like clearing the npm cache didn’t work, I saw noticed this:

File exists: /usr/local/bin/firebase
Move it away, and try again.

Okay, seems sensible enough. I first just renamed it in the same directory.

sudo mv /usr/local/bin/firebase /usr/local/bin/firebaseBKP

I re-ran the npm installation command, and sure enough it worked without any issues. I verified I could actually see firebase in my $PATH:

which firebase

And that it was the newer version:

firebase --version

With that out of the way, I simply deleted the file I renamed:

sudo rm /usr/local/bin/firebaseBKP

Then I could push the update to my site without any issues. To be honest I’m not entirely sure why or how that file wouldn’t be controlled by firebase or it couldn’t be removed by running the command under sudo, but I’m happy that it had a clear error message that allowed me to fix things easily enough… once I actually, you know, read the error message.

PSA: Get Ready For New Let's Encrypt Validation

If you’re using Let’s Encrypt, now would be a really great time to make sure that you’re ready for them to stop supporting ACME TLS-SNI-01 domain validation. I got an email a couple of days ago (as I assume everyone using Let’s Encrypt did) letting me know this change was coming. I had nothing to actually do, but going through the validation was super easy and is likely worth the time to ensure your site(s) aren’t impacted. March 13th is the deadline for ACME TLS-SNI-01 to no longer function, so there’s still a lot of time to take a couple of minutes and verify you’re in good shape.

*Note: I’m using certbot, which makes this whole thing super easy. If you’re not using certbot then your steps will be different.*

The Let’s Encrypt staging environment already has disabled ACME TLS-SNI-01 validation, so checking against that is a good test. As a certbot user, I also needed to validate that I was using at least version 0.28 of the application, which is simple enough to do via:

certbot --version    

That appears to be the latest version offered by the PPA: ppa:certbot/certbot

Testing a certbot run against the staging environment is toggled via the --dry-run switch. If you do a dry run of your renewal against the staging environment and everything comes back successful, you should be in good shape:

sudo certbot renew --dry-run

My certs all validated successfully, so everything is ready to go for the change. I presume if there are any failures then the dry run will alert you to what needs to be fixed; I can’t say for sure since I was lucky enough to not see any of those. Full instructions from Let’s Encrypt are available on their site, though.

Happy encrypting!