Enhance Your macOS Productivity with Hammerspoon: Remap Caps Lock for Dual Functionality

You reformat your computer, 100% clean. But your forgot which apps are crucial to you because they’ve always been running in the background. This just happened to me, I always had this app called “Hammerspoon”, but I forgot about it. I reformat my computer and I didn’t install it back. What is Hammerspoon? Hammerspoon is a powerful automation tool for macOS that allows you to script custom workflows, remap keys, and much more. As a developer, it’s been invaluable in improving my productivity, particularly with a feature that lets me remap the Caps Lock key to perform dual functions. ...

September 17, 2024 · 1 min · Zakatell Kanda

A Dance with Pride: The Mel Connection

I saw him on a crowded dance floor. Mel, that guy I met a few months ago but never truly connected with. I felt some panic, my heart started to race, but not from the beat of the music. It was fear. Fear of making the first move, fear of rejection, fear born from my own stubborn pride. Little did I know, overcoming this fear would lead to one of the most valuable friendships of my life. ...

July 16, 2024 · 3 min · Zakatell Kanda

Full Disk Encrypted Ubuntu 20.04 in a small dedicated server.

I miss the time when I was still exploring a lot of things in the Linux world. Nowadays, I’m mostly working with servers that are pre-provisioned and almost ready out of the box. Those are nice conveniences for work. I decided though to go back and be like me again ten years ago. Requirements: Experiments with small dedicated server It should be encrypted on disk. Have fun while doing it. Server Providers I looked into two dedicated, Kimsufi and One Provider seems to fit my needs. ...

June 7, 2020 · 5 min · Zakatell Kanda

python scrypt cannot find libcrypto on macos

Today, I tried starting our local django development environment but it failed because of this error. OSError: dlopen(lib/python2.7/site-packages/_scrypt.so, 6): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib What does this error mean? The precompiled scrypt is targeting a now non exising libcrypto.1.0.0.dylib, when I look at the location, it’s been replaced by an updated api version number libcrypto.1.1.dylib. A quick solution is to soft link it to the exact same path as previous and hope that the api didn’t change much. ...

April 7, 2020 · 1 min · Zakatell Kanda

Using Github Actions for Deploying Hugo

Before, whenever I tried updating this blog, I have to follow some steps: Write content Commit Run the publish to master scripts Well, guess what, I can now remove that last script, because of Github actions. But it was not without pain moving to this new platform. First, I had to read a lot of documents that don’t seem to relate to what I wanted to do. Well, shame on me for reading those, but they were fun, and I learned a lot. So, although I wasted a lot of time, it doesn’t matter for me, and I hope to reuse those learned lessons to my current job. ...

April 6, 2020 · 1 min · Zakatell Kanda

golang: dynamic type in a json field

We had an experience where the type of a field change base on certain conditions. We think this is bad, but we have to support it. Here’s how. You’ll have to specify the field type as an interface. type P struct { T interface{} `json:"t"` } After that, you’ll need to use switch to determine the type. In our case, we needed it as int. var i int var p P s := `{"t": "3460"}` // should also work with // s := `{"t": 3460}` if err := json.NewDecoder(r.Body).Decode(strings.NewReader(s)); err != nil { fmt.Errorln(err) } switch t := p.(type) { case float64: i := int(t) case string: var err error if i, err = strconv.Atoi(t); err != nil { return nil, fmt.Errorf("t is not a number: %#v", err) } default: fmt.Errorf("t is of invalid type: %#v", t) } Simple as that. Thanks again to my colleague Harmen for this solution. ...

November 7, 2018 · 1 min · Zakatell Kanda

a possible list to think about when writing a test.

When writing test, the documentation that the API you are integrating will only list all the good values that they intend to deliver to you or the other way around. What I observed from working with my colleague Harmen is this: A negative test A positive test for the happy path An empty input A malformed data I might add more example in the future but for now, I’ll try to follow this guideline. ...

November 3, 2018 · 1 min · Zakatell Kanda

installing prometheus in k8s cluster with helm

Prerequisite: A cluster with RBAC enabled. Have enough capacity in the cluster Install Helm: kubectl create serviceaccount tiller --namespace kube-system kubectl create clusterrolebinding tiller-rb --clusterrole=cluster-admin --serviceaccount=kube-system:tiller helm init --service-account tiller Get the values.yaml from here Edit some things that you want to tweak, for us, we change the CPU limit to a lower value. Then just install Prometheus: helm install -f values.yaml --name prometheus stable/prometheus Ideally, this should be installed in another namespace but we will keep it simple for now. After the installation you will have this new pods running in your default workspace: ...

September 4, 2018 · 1 min · Zakatell Kanda

our experience in resizing an ebs volume in ec2 instances.

Increasing disk space without downtime. So in our team, we had to resize an instance disk because it’s getting full, this is our experience. For the first time we search on how to do this, there are many articles written about it and most of them require to stop the system and detaching a volume. But there must be a real doc from aws itself, that is most likely up to date. ...

March 19, 2018 · 2 min · Zakatell Kanda

disabling udp in memcached.

One of our server provider which is running in Germany have a bot that scans for an open port, this is to prevent other humans/robot in abusing services that are open on the internet. For us, they determined that our memcached port is open, we were confused at first how could this happen, we were sure that this is blocked via iptables. It turns out memcached by default listens to both TCP and UDP, since we don’t have yet a firewall for UDP, we opted for something simpler and to disable UDP on memcached(we know we only use TCP). ...

March 7, 2018 · 1 min · Zakatell Kanda