Easily add something to linux system startup

This info worked from the Simplified guide: https://www.simplified.guide/linux/automatically-run-program-on-startup I wanted to start postgresql at startup, because I always end up starting it anyway. As a main-stream application I found it on the list: sudo systemctl list-unit-files --type=service Then I enabled it. sudo systemctl enable postgresql Done! If it hadn’t been on the list I suppose I would have had to make my own unit file for it, thereby adding it to the list.

Getting haikarainen light working for screen brightness on OpenSuse and EXWM

I use light for managing my screen brightness in exwm, because the repo-available xbacklight fails for want of a recognizable xserver. One day my exwm just stopped finding “light” after using it for screen brightness for a year or two. When trying to re-install with the instructions on their repo, I kept getting this error: autoreconf: running: automake --add-missing --force-missing --warnings=portability autoreconf: no config.status: cannot re-make The solution turned out to be to skip the autogen part of the instructions and just move on:

Excellent thread: java vs c# for developer productivity

A classic thread that gives a mature and responsible consideration of such things as ecosystem and tooling. In particular appreciate Mikera’s answer respecting Java’s extensibility as the more open of the two, which has led to things like Groovy, Scala, and Clojure (though Clojure also has a CLR version, it’s being hosted on the JVM is one of its super-powers). https://softwareengineering.stackexchange.com/questions/51887/java-vs-c-productivity-perspective

Easy incrementing find and replace in emacs

I start with a list with a bunch of entries like this: newsletter W02 newsletter W02 newsletter W02 newsletter W02 EDIT: New Solutions It turns out that emacs automatically initializes a variable that tracks how many interations your replacement function has made, and in lisp mode you can get to it with \#. This way, the single line necessary to number all my newsletters becomes this: W\(02\) → W\,(format "%02d" (+ 4 \#))) and, of course, you can adjust that 4 to whatever you need it to be for your starting digit.

Make GNUs "sent" show recipient, not author

https://www.reddit.com/r/emacs/comments/e66ewg/make_gnus_sent_show_recipient_not_author/ I’m a GNUs user and am pretty happy with it. However, I have a “Sent” message group where the summary line is the same as everywhere else, meaning it includes the author (me!) and not the recipient. How can I change the summary line format in just the outgoing buffers (or, alternatively, if the author is me)? For reference, here’s my current insensitive line-format variable: (setq gnus-summary-line-format "%U%R%([%-30,30f]:%) %-50,40s(%&user-date;)\n") The winning solution?

Resize gif with gifsicle

Turns out resizing animated gifs with imagemagick is clumsy. Gifsicle does it quick and without fuss. Below is my command, taught by askubuntu. gifsicle --resize-width 600 helm-org-clock.gif -o hoc-smaller.gif This resizes my screen-capture gif to a scaled width of 600 and whatever height keeps the proportions, which dropped my size from 160k to 58k.

Emacs can't show light background

Although I’ve long had a habit of frequently changing my themes, even having a key chord set for that, at some point recently I became unable to switch to any light-background theme; it was always some shade of black. This became a real problem since Wikipedia in eww became unreadable for equations. I looked into this and found the answer from Sacha Chua, who pointed me to M-x customize-face default which had somehow had my default background set to some dark dark gray (I’m guessing when I was playing with persp mode).

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).