Revive an old Neufbox 6 with OpenWrt

While this article might only have interest for french people, you might want to get yourself an inexpensive Neufbox 6 on eBay or the like to play with it, thus the english language. When I lived in France, my last Internet provider was SFR, it was (and still is) a fiber provider, and you got connected thanks to a box called the “Neufbox”. There were a couple of versions of this box that was pretty hackable and the provider was cool with it, you could even flash it with “opened” versions of their firmware, a modified OpenWrt.

Monitor network health with somebar

I knew about a MacOS task bar plugin called Anybar, which basically draws an icon on the task bar to which you can send behaviors with a simple nc command. Naturally, someone cloned it for our beloved Free Unices environments, and it’s called somebar. I am sometimes in places with weak network, and I like to see at a glance how is my connection doing, somebar seemed the perfect tool for the task.

Is LevelDB 2 times faster than BadgerDB? (Update: No)

Update (2020/05/21) the method used in this post is totally sub-performant, and I finally found out about LevelDB’s and Badger’s batch methods, which make writes considerably faster, I’ll probably write another note about this. And by the way, I found Badger to be much faster at writing batches than LevelDB. Actual post I’m working on a plugin for Goxplorer that will create a database of all Bitcoin addresses present in its blockchain.

FreeBSD networking issues: TCP offloading and checksum

In the past month, it’s the second time I’m being bitten by FreeBSD in the networking field. First time with my own gateway, I had this weird behaviour where machines on a different VLAN than the main one would use the Internet at full speed but would struggle to make any transfer from the main VLAN. Turns out this was a tcp segmentation offload issue, which seems to cause so much problems it is disabled by default in some appliances.

Gitlab CI caching for Go projects

The reference documentation when it comes to couple golang and continuous integration in Gitlab is this one, it’s well put, easy to read and pretty accurate. Except for the caching part, or at least nowadays with go modules. This is what happens when a commit is pushed with the .gitlab-ci.yml given as an example in that document: 131 Creating cache default... 132 WARNING: /apt-cache: no matching files 133 WARNING: /go/src/github.com: no matching files 134 WARNING: /go/src/gitlab.

Understanding golang channel range... again

In a previous article, I tried to explain my understanding of go channels interaction with ranges. Turns out my explanation was probably not clear enough because here I am, nearly a year after, struggling to achieve pretty much the same exercise. So here we go again, on a good old trial and error fashion progress. The goal here is to retrieve channel messages that are pushed from go routines created in a for loop.

proof-of-work based blockchain explained with golang

Yet another “blockchain explained” article, I know, I really thought about if releasing it or not, but you know, you only understand what you can explain clearly, so I hope I’ll be able to explain proof of work and blockchain as clearly as it is clear in my mind. The originality of this post is that I’ll try to make those concepts clear through pieces of code extensively explained so it doesn’t feel like a theoretical expose where you get the idea without the taste.

Replacing a (silently) failing disk in a ZFS pool

Maybe I can’t read, but I have the feeling that official documentations explain every single corner case for a given tool, except the one you will actually need. My today’s struggle: replacing a disk within a FreeBSD ZFS pool. What? there’s a shitton of docs on this topic! Are you stupid? I don’t know, maybe. Yet none covered the process in a simple, straight and complete manner. Here’s the story:

golang reflection tips

Because I’m the kind of person who likes genericity, I often find myself using features of languages that are flagged as “only use it if you know what you’re doing”. Golang reflection is one of those features, powerful yet a bit confusing. Reflection, as explained in The Laws of Reflection is the ability of a program to examine its own structure, particularly through types; it’s a form of metaprogramming In short, you can introspect variables at run-time, making your program exceptionally dynamic.

Cleaner micro Kubernetes on OSX

While my main workstation is a Linux Mint machine, I occasionally use my OSX ${WORK} laptop for traveling and composing. I’m not really fond of the OS, but at least it’s an UNIX-like, and pkgin runs well with it ;) When I’m “on the go”, I like to try things and play along with technologies I’m currently obsessed with, among them Kubernetes. On OSX, the natural choice is to go with minikube, it’s kind of integrated and does the job well, but if you tried it already and also happen to run docker for OSX you might have found yourself struggling with versions and consistency between the two.