Recent posts

Multiple git accounts

on October 2, 2017

How to associate different git account to different projects? Let’s say you have two github accounts, one used at work and the other for your own projects but you want to use both from one linux account. You want to work on each project without a need to type in appropriate credentials everytime you push changes. Firstly you need to generate unique ssh keys for each of them:

Continue reading

MYSQL timestamps in Go

on August 27, 2017

Simple but handy Formatting time in Go is a very interesting topic but let’s focus on a particular case: a popular TIMESTAMP format used in MySQL: ‘0000-00-00 00:00:00’. It turns out that if you want to use it in Go, you have to format time yourself. Luckily it’s a very easy job in Go. Let’s take current time: t := time.Now() fmt.Println(t) This will result in displaying time in the following format:

Continue reading

Introduction to Docker container networking

on April 10, 2017

Build your network of containers There’s a lot of tutorials showing how to link containers using the docker run –link option, but the link flag is a depricated feature of Docker and may be eventually removed. I will show you how to link containers via docker network providing a template of Dockerfile for your Golang application, but the focus here is really on the process. It’s there already… Assuming you haven’t created any networks yet, executing docker network ls should list the default Docker networks:

Continue reading

How to sell Golang to your employer

on April 4, 2017

Can you translate that to human language? A little over a week ago, Loïc Hoguin, the creator of Cowboy - a very popular web server built in Erlang, published an article about his experience of conviencing people to use Erlang, or rather their reaction when they see the Erlang’s syntax :) It inspired me to write this post. It’s hard to change humans habits (that’s how our brain works), so even if you give someone a super tool solving their problems but it will require changing their habits it might take longer than you expect.

Continue reading