ZSH Alias Last Command and Alias + Persist commands

Posted on August 28, 2023 [programming] [tricks] [zsh]


If you find yourself constantly running the same long commands on your terminal, setting up quick aliases can be a game-changer. This blog post will walk you through creating two handy ZSH functions that allow you to define and save aliases on-the-fly. With these, you can alias any command, including the last command you ran, without even leaving the terminal!

1. Create Aliases On-the-Fly

First up, let's talk about how you can instantly create aliases for any given command....

Introducing squeuelite: Golang + SQLite queue

Posted on July 26, 2023 [development] [squeuelite] [opensource]

It finally happened! I am about to introduce my first proper open source project, it is called squeuelite and it is a Golang package that tries to fix the queue issue using SQLite only.

The package can be found out github.com/risico/squeuelite, check it out. The package is not production ready yet, although I’ve been using it already in maile.io (from where I’ve extracted it) and is able to handle quite a bit of load (I’ll post benchmarks soon)....

Understanding the Unusual Behavior of Golang's Custom UnmarshalJSON Method with Inner and Outer Struct Fields

Posted on April 28, 2023 [golang]


In this blog post, we will discuss an interesting case in Golang where using a custom UnmarshalJSON method on a struct with both inner and outer fields results in only the inner fields being unmarshaled. We will look into why this occurs and suggest two alternative solutions to overcome this issue. Let's start by understanding the problem.

The Problem

Consider the following Go code with a struct named Person that has inner and outer fields:...

git check-ignore

Posted on October 21, 2022 [git] [development] [tools]

In the world of version control, Git has become an indispensable tool for developers. One of its key features is the ability to selectively ignore certain files or directories with the help of the .gitignore file. This can be a real lifesaver when you need to exclude files that don't belong in your repository, like build artifacts, logs, or user-specific settings. However, sometimes it can be challenging to figure out why a particular file is being ignored. That's where the git check-ignore command comes in handy! In this blog post, we'll explore this powerful yet underutilized Git command and how it can help you understand your .gitignore configuration.

A Quick Overview

git check-ignore is a command that allows you to determine if a file or directory is being ignored by Git due to the rules specified in your .gitignore files. By using this command, you can quickly identify which rule is responsible for ignoring a specific file or directory and make necessary adjustments if needed. The basic syntax of the command is:...

Lessons in cybersecurity, Part I

Posted on February 18, 2022 [security] [stories]

Here's a little story from the trenches, from far far away when I was a kiddo learning my way through webservers, PHP and vulnerable (pirated) bulletin boards software.

👋🏻 Intro

A long time ago around 200* something, I was really interested in game hacking related topics and somehow I got in charge of a big forum in the niche. That was my first intro to PHP and anything web related and while being quite good in C++/assembly and having some knowledge of how to breach software security I had stumbled into a fresh new world....

GBrowse selected lines and copy to clipboard

Posted on February 15, 2022 [development] [git] [vim]

When talking with colleagues over chat about certain parts of the code it’s very helpful to show and give context as quickly as possible.


Hello world, again❗

Posted on August 26, 2021 [ramblings]

Well well well ... here I go again!

Another attempt at something that should resemble a personal blog, after more than 14 years in the system and more than 5 attempts, hopefully this is the one that lasts. ...