Writing a github extension in go

I hadn’t put any thought into using the github or gitlab CLI for a long time, but both are pretty useful. We are using standard github for projects and also a self installed gitlab. Both CLIs are golang programs.

First we need to authenticate.

⋊> ◦ gh auth login                                                         
? What account do you want to log into? GitHub.com
? You're already logged into github.com. Do you want to re-authenticate? Yes
? What is your preferred protocol for Git operations? SSH
? Upload your SSH public key to your GitHub account? /Users/niko/.ssh/id_rsa_m1.pub
? Title for your SSH key: GitHub CLI
? How would you like to authenticate GitHub CLI? Login with a web browser

! First copy your one-time code: 4024-84CC
Press Enter to open github.com in your browser... 
✓ Authentication complete.
- gh config set -h github.com git_protocol ssh
✓ Configured git protocol

✓ Uploaded the SSH key to your GitHub account: 
✓ Logged in as hellonico
gh extension install redraw/gh-install  

https://pkg.go.dev/github.com/cli/go-gh#section-readme

How to use AWS S3 for persistence in Kubernetes

We recently deployed a Kubernetes cluster based on KubeSpray at a client. Since there is no out of the box cloud storage, one of the first task to clear for the cluster deployment is the data persistence.

We gave sshfs a try, and then thought we could actually also manage the distributed persistence using Goofys. Goofys allows you to simply mount an AWS S3 bucket as a file system. In effect, all the S3 data is synchronized between the different nodes of the cluster.

Shipping Go [Manning]

Thanks to the (very friendly) reviewers team at Manning I just got my hands on the newly released Shipping Go, and first of all I had a great time reading from start to finish which hasn’t happened in a long time as far as IT books go.

I was actually pleasantly surprised.

  • the amount of code in the book is kept to a minimum
  • the focus is on keeping the product to a minimal set of features,
  • shows how to push a quality code out,
  • and to a various set of plateforms and environments (and why both production and developpers environment should be kept as close as possible to each other )

The book focuses and explores the lifecycle of go projects in particular, but the techniques presented can be easily reused in the scope of other languages.

LondonAirquality Analysis with IcCube

../london.jpeg

If you do analytics, you probably usually go straight for Python Notebooks, and create a bunch of graphs to visualize the analysed data.

When you don’t want to show that data to someone outside, and hide implementation details, a nice alternative, and my de facto favourite, is to go and use IcCube.

As an exercice, I was teaching how to get ready and graph quickly with IcCube, using air quality data.