Firefox Containers Helper Extension v0.0.14 Released

Firefox Containers Helper v0.0.14 is out now, as of 3/17/2021 - previously v0.0.10, released back in November 2020, a few awesome features have been added! Check out the extension View the extension here! You can also view the source code here on GitHub. Thank you to the community What makes this release of Firefox Containers Helper special is that it has received some awesome community engagement! I really never thought that it would gain enough attention or usage from people around the world for people to create GitHub issues, pull requests, and become supporters...

March 18, 2021 路 3 min 路 Charles M. Knox

How we used automation to get COVID vaccines early

馃拤 Introduction A friend of mine, Tynick, and I crossed paths on a project he started - he wanted to get a COVID vaccine by doing a volunteer shift. The two websites that offer volunteering signups occasionally had openings, but they were always taken almost immediately. So, he had the brilliant idea to use some clever Python to automatically check the website, and notify him with Slack or Twilio whenever there鈥檚 a signup available....

March 13, 2021 路 12 min 路 Charles M. Knox

Go 1.16 Deprecating ioutil

Go 1.16 was released - here are the release notes. The thing that caught my eye was that io/ioutil has been deprecated - here鈥檚 what you need to know The io/ioutil package has turned out to be a poorly defined and hard to understand collection of things. All functionality provided by the package has been moved to other packages. The io/ioutil package remains and will continue to work as before, but we encourage new code to use the new definitions in the io and os packages....

February 16, 2021 路 1 min 路 Charles M. Knox
Postman in action.

How to Install Postman on Ubuntu 20.04

Installing Postman with Canonical鈥檚 Snap does not typically work well for me, so I prefer installing it natively. Here are the instructions for doing this on Ubuntu 20.04. Installation First, download the latest release: wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz Extract the underlying archive to /opt: sudo tar -xzvf postman.tar.gz -C /opt Create a symbolic link (shortcut) from the extracted Postman binary to /usr/bin/Postman so that it gets added to your $PATH and you can easily run it by typing the command postman:...

April 24, 2020 路 2 min 路 Charles M. Knox
Docker logo

How to Install Docker on Ubuntu 20.04

It鈥檚 April 24, 2020. Ubuntu 20.04 just came out. Installing Docker via the method I typically use via get.docker.com does not seem to work. Additionally, the Docker website doesn鈥檛 seem to have install instructions for Ubuntu 20.04 yet. Snap installations are recommended by Canonical, but from past experience with the Docker Snap, I prefer to stick to a native method of installation. If you don鈥檛 have Ubuntu 20.04 yet, it was released on April 23, 2020....

April 24, 2020 路 3 min 路 Charles M. Knox

Regular Expression for URL-Friendly Titles

The following Go code snippet will convert a string from this: Wow! This message's getting some _good_ publicity! To this: wow-this-messages-getting-some-good The function The function itself, and its imports: import ( "math" "regexp" "strings" ) // Converts a string to a lowercase, hyphen-separated string of max length 36 func getTitleURLFromString(title string) (output string) { // first, strip out any special characters re := regexp.MustCompile(`(?m)[^\d^A-Z^a-z^\-^\s]`) substitution := "" output = re....

April 18, 2020 路 2 min 路 Charles M. Knox

String Compression in Go

Here鈥檚 how to compress and decompress a string in Golang using the gzip library. package main import ( "compress/gzip" "fmt" "bytes" "io/ioutil" ) // Credit where credit is due! // https://stackoverflow.com/a/19267224 func compressString(str string) (string, error) { var b bytes.Buffer gz := gzip.NewWriter(&b) if _, err := gz.Write([]byte(str)); err != nil { fmt.Println(fmt.Sprintf("Compress string failure %v", err)) return "", err } if err := gz.Close(); err != nil { fmt.Println(fmt.Sprintf("Compress string closure failure %v", err)) return "", err } return string(b....

April 18, 2020 路 1 min 路 Charles M. Knox

Using Angular and Google Analytics

By default, Angular does not work very well with Google Analytics. It will only announce a page-view event when refreshing the page. This makes the router in Angular somewhat useless. Luckily, there is an npm package called angular-gtag that hooks into the root app component of your Angular project and sends views upon router navigation. However, I found that the README had a few implicit steps that I needed to do some searching for....

April 18, 2020 路 2 min 路 Charles M. Knox

How to Fix Angular Not Scrolling to Top for Routerlinks

By default, when using Angular routerLink tags in your HTML, the behavior users will experience when clicking these links is that the browser keeps the current scrollbar positions, before and after clicking. There are cases where this is undesirable, such as when using an Angular router to route URLs (such as /home or /articles ) to Angular components. To fix this, add in your app-routing.module.ts file the following into the @NgModule imports:...

April 17, 2020 路 1 min 路 Charles M. Knox

Every Outbound Link Leaks Privacy

The title is a bit of an exaggeration, but it鈥檚 partly true if you don鈥檛 use the correct properties in your HTML elements. In HTML, you should be using rel="noopener noreferrer" along with target="_blank" in your <a> tags - if not, you run major security risks. This GitHub Pages site shows you how: https://apal21.github.io/target-blank/ Many linters will catch this if it鈥檚 not set, so make sure that you鈥檙e using a linter when you write your code....

April 17, 2020 路 1 min 路 Charles M. Knox