WHAT.THE.ACTUAL.####

Aside

underlying hypernova

Nothing fits the angriness, rage, and sadness.
Everything just explodes with no before nor after.
All the walls break, little perks in the wind.
A never ending unfolding sound of broken glass,
everlasting high pitched pink pain.
Sure there can’t be more out of hundred millions electron-volts,
sempiternal ill witched red rain.

Is there a prime number whose…

Is there a prime number whose binary representation looks like a giraffe?

Yes!

like another prime number?

Yes!

like a prime number of giraffes?

YES!

like Squidward Tentacles?

Heck Yeah!

You’ve probably understood the mechanism by now. Converting a binary image into a number, its nearest upper prime generally only differ in the lesser significant bits, hence most of the image pattern stays the same. So finding a prime number whose binary representation looks like a specific image is relatively easy. I say relatively, because in a computer sens it is quite really complex.

I just wrote a program to do just that. It is written in C and uses GMP. It is around 1k SLOC. It could probably have been much shorter, and even less so in another language. But I wanted something that went a little further than just of simple proof of concept.

I must admit, it’s pretty useless. But still there it is. And there is still much room for improvement. So patches are welcome on GitHub.

Disable XF86Back/Forward

Real ThinkPad keyboards (not this monstruous ignominy) have directly accessible keys for XF86Back and XF86Forward. That is really problematic with web browsers such as Firefox or Chromium since pressing those keys transparently go back or forward into your history, discarding anything you were typing in the process, including that 3 hours long bug report you were just about to submit. That’s rather annoying, to say the least.

Some other blog post suggest to simply disable them with xmodmap. That is in ~/.xmodmaprc (or whatever it is you use):

keycode 166 = NoSymbol
keycode 167 = NoSymbol

I personally prefer to remap them to Next/Prior keys. Having these near the navigation keys might come up handy:

keycode 166 = Next
keycode 167 = Prior

That’s on Linux though, on FreeBSD the keycodes are 233 and 234:

keycode 233 = Next
keycode 234 = Prior

Anyway use the xev command and xmodmap -pke to find the keycodes and remap them to any other interesting key symbol.

Quake-like terminal for i3

Tiling window managers are cool but there are times when all you want is quick access to a terminal that you can toggle when needs be, so you can either do simple calculation, start jobs, open files or satisfy your weird Unix fetish through convoluted piping to dubious file descriptors, all that from the comfort of your own cozy shell interpreter.

Well if that applies to you i3 user then search no more because I may have got just what you need!

I’ve written a drop-down quake-like terminal for i3, i3-QuakeTerm, inspired by a similar drop-down terminal I did for AwesomeWM and i3-quickterm another similar terminal for i3. The later did not work for me because of a bug in i3ipc-python that was just fixed recently. So I implemented my own version as a workaround.

There are some notable differences however. First everything can be done from the command line, so there is no need for any configuration file. But it is still possible to register multiple drop-down terminal types by providing a different name to each one of them.

It also uses WM_CLASS instance attribute instead of i3’s mark to identify the terminal. As a result you can access the terminal window and control it early from i3’s configuration. Finally the terminal is created with a fork instead of in-place starting. That means that you can use any kind of graphical command as the terminal, even if it doesn’t start any shell or command itself, as long as you can use or modify its name as an unique identifier.

More info on the github page.