Using Go os.Args and FlagSet to create cmdline subcommands

TL/DR With Go flag package is very easy to define and parse global command line options. However, if your application needs subcommands, using OS args and creating flag sets is great way to define options for each subcommand.

keep reading chevron_right

Benchmarking Go code

TL/DR Go benchmark is a special kind of test that you can use to profile your code and to compare performance of different implementations.

keep reading chevron_right

Android backup using MTP

TL/DR Fast way to backup an android device on Linux using the USB cable, MTP and rsync

Media Transfer Protocol is available on most Android devices as the primary method for USB synchronization. On Linux there are several implementations of MTP on top of libmtp.

keep reading chevron_right

gtt - git time tracker

TL/DR If you code and need to create regular invoices of your working hours, you might want to give gtt a try.

What is gtt

git time tracker is a simple program that allows you to track how much time you spend coding per day and, at the end of a period, generate an invoice. Even though it has git on its name, gtt can work with any version control system that supports commit hooks or by directly issuing commands from the terminal.

keep reading chevron_right