Compress pdf with Ghostcript

One liner with ghostscript GS to make your pdf much smaller. Options for PDFSETTINGS are (in rank of output quality): /prepress /ebook /screen gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf input_PDF_file.pdf Resources https://itsfoss.com/compress-pdf-linux/

Clojure app setup for Auto-deploy with raw systemd

REPLACED [2022-11-11 Fri] The below is hopefully informative, but it actually only causes a thing to deploy once and then to re-deploy on system restart. For instructions that ACTUALLY auto-deploy, see https://tech.toryanderson.com/2022/11/11/systemd-devops-run-and-restart-services/ Updated [2022-09-19 Mon] Fixed error in deploy script that occurred if trying to restart but nothing was in the docket Updated [2022-07-13 Wed] Enhanced the server-side deploy script to operate more transparently if files are missing.

Should I put my systemd [Install] section in my .path file or my .service file?

Configuring systemd to redeploy my service when I commit a new source .jar file, I have a path file that goes along with the service and uses a PathChanged directive. The [Install] section should be in the path file, not the service file, but I notice this makes “systemctl enable MYAPP” impossible. It turns out that enable MYAPP assumes you mean MYAPP.service, so you actually just do systemctl enable MYAPP.path and you’re set.

Split/shorten a PDF with pdftk

You can use pdftk to reduce a 150-page PDF to a just the pages you care about. pdftk ORIG_FILE.pdf cat 1-5 output NEW_FILE.pdf

Tip: shortcut for kill-this-buffer

I have added the following shortcut, possible since exwm frees up my s- key: (exwm-input-set-key (kbd "s-<backspace>") 'kill-this-buffer) And, for when I am already in an emacs buffer, this added to my personal key map: (define-key map (kbd "s-<backspace>") 'kill-this-buffer) In any case, making a single-chord shortcut for kill-this-buffer has highlighted how often I use the command, and made work that much faster. Highly recommended!

Emacs Inspiration

Watching a great performance on the Tabernacle Choir Organ, I couldn’t help but feel some emacs inspiration. It’s even better with sound. https://youtu.be/i5Ei6CaZZnY?t=2495

Hugo HTML Omitted?

I found that my #Hugo was now omitting my html (such as embedded Youtube) with “html omitted” warnings showing up in my source. Fix with a few lines to your config.toml: [markup.goldmark.renderer] # allow html to be included unsafe = true Resources Answer was found on Hugo’s discourse here: https://discourse.gohugo.io/t/raw-html-getting-omitted-in-0-60-0/22032

Helm Duplicates history

M-x helm shows duplicates after upgrading to Emacs 27. Turns out the changed behavior is easily fixed by configuring history-delete-duplicates. Answer courtesy official issue .

Firefox customizations to remove tab bar and stream-line

Version at time of writing: Firefox 79.0 First, locate your profile by going to the firefox menu bar: Help -> “Troubleshooting Information” and find on the page “Profile Directory”. Navigate there, where you’ll be making/adding two files that allow you to customize behavior and appearance of Firefox. For reference, mine was here: ~/.mozilla/firefox/aabkj82t.default/ . Yours will have some other blob of random characters before “.default”. userChrome.css This file should definitely exist already.

Mysteriously growing into Emacs 27.1

I made the big upgrade to Emacs 27.1, giving myself a full day to work out the kinks. First off, it’s great; I like the early-init, I’m thrilled by the new in-box orgmode, and as things settle I love the new fonts and customizations. There is some strangeness on this journey, though (made worse by the fact that I am an exwm user, so emacs failures are system failures). Everything died.