CTF: JS with restricted chars set
· β˜• 6 min read · ✍️  Firmin Martin
A few days ago, I participated in, or more precisely, dropped by an online CTF contest held in Taiwan. Having no experience, most challenges were just nonsense to me. Except one, which was purely programmatic. This is an in-depth analysis of it. The challenge Author: Leko Challenge: Calculator 0x1 The description of this challenge was Javascript is the best programming language. That’s kind of a hint that suggests you to be prepared to exploit diverse JS syntactic tricks.

Git: autocomplete –trailer and –cc in zsh
· β˜• 3 min read · ✍️  Firmin Martin
Introduction When working on a Git repository developped through email-based workflow (e.g. Git, Linux kernel, Emacs, notmuch etc.), it is often needed to git commit with the --trailer option to acknowledge people, and to git send-email with the --to & -cc options to indicate the recipients of the patch series to send. Newcomers of such workflow, as me, would copy one by one the email addresses from git-log or the project mailing list at the beginning.

Tabs in Alacritty
· β˜• 3 min read · ✍️  Firmin Martin
Introduction Some time ago, I switched my daily terminal from kitty to alacritty due to issue regarding CJK input methods1. However, alacritty is known to not support tabs by design. There are at least two ways to enable tabs: through tabbed or tmux. Both are available in Ubuntu 20.04 package manager. tabbed tabbed is kind of a wrapper that will equip alacritty with tabs. To open alacritty with tabbed, use the following command:

Obtain emails header in notmuch
· β˜• 3 min read · ✍️  Firmin Martin
Introduction It’s been half a month that I’m gradually writing an Emacs package for notmuch email notification. Although it works fine so far, it misses an important feature which consists to display the subject and the sender name on the notification instead of merely saying “2 new messages since last refresh”. Fortunately, probably because the development of the notmuch Emacs frontend, notmuch can speak Lisp S-expression. Notmuch show To retrieve header from emails, we need the command notmuch show.

Breadth-first search grep
· β˜• 1 min read · ✍️  Firmin Martin
Introduction From time to time, I want to search over my dotfiles, precisely those immediately under my home directory ~/. The problem of grep -R <regex> is that it quickly delves into an oceanic trench, full of caches, xml files or databases. In other words, it uses a depth-first approach. bfs-grep The following shell function helps me greatly to deal with such a situation. It employs a breadth-first search, i.e. level by level.

A tale of installing RT18812AU driver and make it works in VirtualBox
· β˜• 3 min read · ✍️  Firmin Martin
Few days ago, I bought a USB Wi-Fi adapter to learn about pentesting. The goal was using this adapter to connect a virtual Kali Linux distribution in VirtualBox to Wi-Fi network through USB. After some hesitations, I picked up a cheap enough model which uses a RT18812AU chip. An important factor to choose this chip is that it is dual-band. This was the first time I’m dealing with such material. Of course, there was no such thing as plug-and-play.

Rating images painlessly with exiftool feat. ranger & sxiv
· β˜• 9 min read · ✍️  Firmin Martin
Background I was looking for a way to classifying images by rating them on the fly. My first attempt was using darktable as suggested in a thread. Indeed, the auto-advance rating mechanism was quite handy. But it is still too heavy for this sole purpose. In darktable, user have to import images before editing metadata. When tens of thousands images are involved, the process of importing images can be quite time-consuming1 as it creates for each image an XMP file to store metadata.

Read and Compose Email in Emacs with Notmuch
· β˜• 11 min read · ✍️  Firmin Martin
It has been 18 months that I read & write my emails in Emacs. No need to say I have enjoyed the mouse-free experience brought by Emacs. Recently, I had to keep track a new email account. So I came across my old note written back then which I enhanced in this post. I made lots of updates subsequently including password management through pass, multi-accounts support etc. to make it as complete as possible.

Migrate from vimwiki to Org mode
· β˜• 5 min read · ✍️  Firmin Martin
Around 2016-2017, I used vimwiki a lot to take spare notes of Linux, programming & mathematics related topics. I moved from Vim to Emacs in June 2019 for the great Org mode and never came back. Recently, I wanted to get rid of my good old vimwiki directory and merge it in my org-mode personal wiki (using org-glaux). Since it’s a one-time task, I decided to use the only available outdated script then write some Emacs code to fix the result instead of patching the old script.

Consult dictionaries in Emacs
· β˜• 3 min read · ✍️  Firmin Martin
The most time-wasting thing when learning natural languages or reading literature works is nothing more than consulting a dictionary. During my studies, I came through three stages: paperback dictionary, online dictionary and Google Chrome search engines. The time requiring to consult one entry has decreased from a few minutes to dozens of seconds, but I’m still not satisfied with this speed. Figure 1: A Kangxi Dictionary. It was quite fascinating to read when I was a child.