Dependabot Bundler

Hello Dear readers. Today, I would like to write about a small pet project of mine called Dependabot Bundler. We’ve all been here: You would like to review these individually, of course, however, having to individually merge them is quite the pain. Isn’t it a lot better to do this instead? A lot nicer and more comfortable, isn’t it? This is done by running dependabot-bundler with the following command: ...

May 16, 2022 · 1 min · hannibal

Efferent and Afferent metrics in Go

Intro Hi folks! Today I would like to write about a metric that I read in a book called Clean Architecture from Robert Cecil Martin ( Uncle Bob ). Abstract The metrics I mean are Efferent and Afferent coupling in packages. So you, dear reader, don’t have to navigate away from this page, here are the descriptions pasted in: Afferent couplings (Ca): The number of classes in other packages that depend upon classes within the package is an indicator of the package’s responsibility. Afferent couplings signal inward. (Affected by this package) (Fan-In). ...

April 21, 2019 · 6 min · hannibal

Go SSH with Host Key Verification

Hi folks. Following a long search and reading lots of debates and possibilities of doing SSH within Go, I was shocked to see that not a great many tools and people use SSH with host key verification. What I usually see is this: HostKeyCallback: ssh.InsecureIgnoreHostKey() This is terrible. Now, I realise that doing HostKeyVerification can be tedious, but don’t fear. It’s actually easy now that the Go team provided the knownhosts subpackage in their crypto SSH package located here: KnownHosts. ...

February 17, 2019 · 2 min · hannibal

Kubernetes distributed application deployment with sample Face Recognition App

Intro Alright folks. Settle in and get comfortable. This is going to be a long, but hopefully, fun ride. I’m going to deploy a distributed application with Kubernetes. I attempted to create an application that I thought resembled a real world app. Obviously I had to cut some corners due to time and energy constraints. My focus will be on Kubernetes and deployment. Shall we delve right in? The Application TL;DR ...

March 15, 2018 · 32 min · hannibal

Go Budapest Meetup

Intro So I was at Go Budapest Meetup yesterday, where the brilliant Johan Brandhorst gave a talk about his project based on gRPC using gRPC-web + GopherJS + protobuf. He also has some Go contributions and check out his project here: Protobuf. It’s GopherJS Bindings for ProtobufJS and gRPC-Web. It was interesting to see where these projects could lead and I see the potential in them. I liked the usage of Protobuf and gRPC, I don’t have THAT much experience with them. However after yesterday, I’m eager to find an excuse to do something with these libraries. I used gRPC indirectly, well, the result of it, when dealing with Google Cloud Platform’s API. Which is largely generated code through gRPC and protobuf. ...

February 6, 2018 · 2 min · hannibal

Huge Furnace Update

Intro Hi folks. In the past couple of months I’ve been slowly updating Furnace. There are three major changes that happened. Let’s take a look at them, shall we? Google Cloud Platform Furnace now supports Google Cloud Platform (GCP). It provides the same API to handle GCP resource as with AWS. Namely, create, delete, status, update. I opted to leave out push because Google mostly works with git based repositories, meaning a push is literary just a push, than Google handles distributing the new code by itself. ...

January 13, 2018 · 6 min · hannibal

Commit-Build-Deploy With AWS CodeBuild and Lambda

Intro Hi All. Today I would like to write about an AWS finger practice. Previously, I wrote about how I build and deploy my blog with Wercker. Since, I’m a cloud engineer and I dislike Oracle and it’s ever expending tenctacles into the abyss, I wanted to switch to use something else. My build and deploy cycle is simple. Commit to Blogsource Repo -> Wercker WebHook -> Builds my blog using Hugo -> Pushed to a Different Repository which my Github Blog. ...

December 4, 2017 · 4 min · hannibal

Furnace Binaries

Hey folks. Quick note. Furnace now comes pre-compiled easy to access binaries which you can download and use out of the box. No need to install anything, or compile the source. Just download, unzip and use. Here is the website: Furnace Website. Enjoy, Cheers, Gergely.

September 3, 2017 · 1 min · hannibal

How to do Google Sign-In with Go - Part 2

Intro Hi Folks. This is a follow up on my previous post about Google Sign-In. In this post we will discover what to do with the information retrieved in the first encounter, which you can find here: Google Sign-In Part 1. Forewords The Project Everything I did in the first post, and that I’m going to do in this example, can be found in this project: Google-OAuth-Go-Sample. Just to recap, we left off previously on the point where we successfully obtained information about the user, with a secure token and a session initiated with them. Google nicely enough provided us with some details which we can use. This information was in JSON format and looked something like this: ...

November 2, 2016 · 6 min · hannibal

Always Go with []byte

Update: This post ignored the fact that this works for utf-8 characters only. Characters which are stored on more than 1 byte will cause trouble. Look at this Effective Go Example. for pos, char := range "日本\x80語" { // \x80 is an illegal UTF-8 encoding fmt.Printf("character %#U starts at byte position %d\n", char, pos) } Prints: character U+65E5 '日' starts at byte position 0 character U+672C '本' starts at byte position 3 character U+FFFD '�' starts at byte position 6 character U+8A9E '語' starts at byte position 7 Keep this in mind when working with strings. ...

August 19, 2016 · 3 min · hannibal