Tracking versions in Go

Some of my services were written in Go, and we wanted a way to track which version was used, so we can track and solve issues. Or even see when the application was deployed or from which source was built. The code is on git, so adding a git commit hash to the mix will make our problem easier. Luckily go provides us with a simple way of doing this.

Dropping all databases in a MongoDB

I needed to drop all the databases or based on a filter in MongoDB.

Dropping all collections in a MongoDB database

I needed to drop all the collections in a database without dropping the database.

Interview Question - Fibonachos User Story

As an avid foodie, I want to eat Fibonachos. I want to see a program that will print the Fibonacci sequence described below so that I can assess how many I can fit on a plate, and assess basic to moderate programming skills in a language of the candidate’s choice.

Verifying SSH Key Fingerprints with DNS records

SSH Fingerprinting is a method to provide DNS records for key fingerprint verification of any client that logs into said machine.

Doing this will prevent users from blindly typing ‘yes’ when asked if they want to continue connecting to an SSH host who’s authenticity is unknown.

Most of the people just type ‘yes’ without even checking if it’s correct or not, which defeats the purpose of the prompt.

The fingerprint records together with DNSSEC will completely bypass the prompt and have SSH verify the fingerprint automatically.

Automatically switch between WiFi and Ethernet

I wanted a way to automatically switch between wifi and ethernet when I connect the system to the ethernet port, or auto start wifi when I disconnect the ethernet port.

Simplest way to do so was to use NetworkManager to enable/disable wifi, when we detect an ethernet connection.

I also wanted a way to track what is happening so we log to syslog our actions, and a way to disable the functionality without removing the file from they system.