Gif screencasts from Linux CLI with Byzanz

Wanting to demonstrate the power of emacs M-x butterfly, I needed to make the sort of gif-screen-capture I’ve seen others put to good work. Extra snag: I use emacs itself for a window manager, so the first online recommendation of Peek didn’t work. Instead I found the open-source byzanz to record; however, it requires knowing the screen-portion and length of the gif beforehand. Other than that, though, it worked great even on my exwm (GUI-resistant) system.

movemail: mailbox (file) cannot lock: Conflict with previous locker

I receive an error when something somewhere crashed, and couldn’t get my mail into emacs Gnus with the following error: movemail: mailbox `/var/spool/mail/webdevtory’: cannot lock: Conflict with previous locker (1 return). Continue? (y or n) Continuing was useless (didn’t show my new mail), restarting the whole machine didn’t work. So just go to the directory and delete the .lock file in there. Back to health.

Firefox: Keyword Shortcuts 2019

For years I’ve had shortcuts in Firefox. In this example, I’ve long been able to type i thing in my URL-bar and it would immediately take me to a google image search for “thing”. In the past this was added by right-clicking “search” on some page and selecting “add a shortcut for this search”. At some point, though, that went away. The functionality is now hidden a little, and you solve it with bookmarks (which I also haven’t used in any form for years).

Getmail failure: invalid syntax

getmail -rmymail.conf File “/usr/bin/getmail”, line 64 except ImportError, o: ^ SyntaxError: invalid syntax It turns out, the service I use to collect my email, getmail, requires python 2; I’d forgotten this (if I ever knew it) and made python 3 my system default (I rebound the “python” command to 3 instead of 2) and so it failed. I didn’t realize this until 16 hours later wondering why I wasn’t getting my mail, and digging into my scripts, evaluating line by line, I finally got the above error.

Auto-add BCC address to notmuch/message-mode messages

I use GNUs for most of my email needs, but also have notmuch for rapid search of my inbox. Trouble is, when I choose a message in that notmuch search, it doesn’t open it with gnus but with its own message-mode spinoff called Message[Notmuch]. In GNUS I have an automatically added BCC address (my “sent-mail” inbox, which is downloaded across devices to sync what I’ve sent). How can I get the same automatic BCC added to anything I send in reply with Message[Notmuch]?

Helm-grep project refactoring: search and replace

With this you can readily search an entire project directory for some text, and then make whole-scale changes to any or all files containing that text. I assume you already have helm-projectile installed and you use it; if not, you’re missing out! First, install wgrep and helm-wgrep, for which I use use-package and my emacs.el init file: (use-package wgrep :ensure t :config (use-package wgrep-helm :ensure t)) Then, execute helm-projectile-grep for the text you desire.

New Screenshot tool: Flameshot

Flameshot is an excellent new screenshot tool to replace Spectacle, the default KDE tool that served me for years until the latest round of software updates. Suddenly out a screenshot utility for my exwm setup, Flameshot more than impressed me with its rapid editing functionality in addition to the nuts-and-bolts screenshots. Then implementing it into my exwm and binding to my printscreen key was easy: (exwm-input-set-key (kbd "<print>") (lambda () (interactive) (start-process-shell-command "flameshot gui" nil "flameshot gui")))

Getting Twitter Media gif/videos to work

I was receiving the error “We cannot play the video in this browser. Please try a different web browser.” I noticed they worked in Chrome but not Firefox; in my experience this is because Firefox has some additional protections against non-free software that CHrome doesn’t care about. I identified that my browser was missing some codecs checking youtube and spotting the red-boxes under “what does this browser support?” Looking around I found this solution.

HP Printer disabled

Went to the cups interface (https://localhost:631) -> Printers -> TARDIS -> “Resume” I don’t know why it ended up paused. Trying all the system (non-cups) things to enable it, restarting many times, never fixed the problem.

Sweet Honeysql and Postgres

I thought I’d share a snippet of what I love about my HoneySQL + Postgres setup (this is plain Honey without the Postgres extras, which never seem to cover my needs). I don’t take any pride in the actual database model, which is in-use and was not well designed. Nonetheless, the two things that worked out nicely here are: table applications has a one-to-many relationship with validations, so PG’s “distinct on” was the perfect tool for just matching the most recent of an application’s validations.