Git fatal: unknown index entry format 0x72000000

Intro I used a recursive git rename, but thoughtlessly used it at the top level of my project, where my .git could be effected. Git then broke on all commands with error, fatal: unknown index entry format 0x72000000 Thankfully this can be easily fixed by removing and resetting the git index1. $ rm -rf .git/index $ git reset Instead of the rm I just moved the git to a safe place in case I needed something less destructive.

macro power: removing weekends from repeating event

Updated: [2021-12-09 Thu] comment clarifying “macros” Intro Time to make a new daily event for the next 90 days, but it shouldn’t have weekends. Most of these steps become muscle memory after getting used to emacs macro power in orgmode files, sql dumps, dired find-and-replace, text formatting, YAML/XML/HTML/JSON/EDN tailoring, etc. It’s the speed and flexibility of this method that shines, allowing for solutions to very specific problems, or just nice custom orgmode agenda entries in this case.

Uploading Files and Handling Upload Requests in Clojure[script]

What’s the secret? I have used ajax uploads and interactions in Clojure forever; it’s a bread-and-butter skill to use AJAX and JSON1. However, my WordPress usage led me to believe it would be equally trivial to handle file uploads. It turned out to be less trivial than I expected, though. In summary, the secrets I needed were: Make sure the encType on the client is "multipart/form-data", which happens differently with AJAX than with plain HTML

Producing a VSCode-style code screenshot for Twitter with ImageMagick

The Goal The Trouble with Image Magick I am new to Image Magick but am trying to get it to convert my image to a size and background pleasant for Twitter. The qualities I’m going for are as follows1: my overall canvas size 16:9, so about 1200x675 my actual screenshot centered and about 3/4 the width background texture of my choosing My early attempts were like the following, but it didn’t seem to actually do anything:

How to check keybindings in isearch mode

I can use C-h m to check the bindings of my current major mode, if it’s one where I can rest my cursor. But how can I check the bindings that are present in, eg, isearch mode? I can set up such bindings, but I’m not sure how to review them. Answer: describe-keymap In emacs 28 there seems to be created the perfect function for this: (describe-keymap)1 Footnotes 1 Thanks to the answer on Reddit for this one: https://www.

HTML project in emacs

The Task An old (ie 10+ years old) desktop application needed to be converted to a web application for modernization purposes. The program was a simple display of textbook-style information with links to audio content. We decided to build this with as simple a technology as possible, with hopes for longevity to exceed what it has had before: raw HTML and CSS, with as little Javascript as possible, optimizing compatibility1, longevity, and load time.

get selected value of a select box in Clojure

option onclick Event not Supported With a recent bug I was reminded that <option /> are not allowed to have onClick events by Google Chrome. This led to some annoying debugging as to why something was working in Firefox but not Chrome on one of our applications. Fortunately, Clojure ships with Google Closure, which provides a straight-forward way of obtaining the selected index, and then getting that from the options of the sel.

bufler closes windows from bufler window on switch

Intro This is an issue that others are experiencing too.1 Just pulled and evalled latest bufler moments ago. Have multiple frames/windows running, eg C-x 2 M-x bufler choose one of the buffers from the list, to move to it See it close one of your other windows. I discovered this when it was eliminating my exwm workspaces upon choosing something, but I found that it is by no means limited to exwm things.

How to have orgmode footnotes per entry?

Problem As laid out on reddit1, I arrange my orgmode notes as single files with lots of entries. This works great for me because emacs is more buffer-oriented than directory-oriented, so all the emacs search commands optimize for single-file approaches (eg search all headlines in my tech/blog file for the keyword of that Linux function I’ve forgotten how to use). The single problem I have is footnotes. From the documentation you have two options: inline or in a file-wide section.

setting up a local version of Wordpress on Tumbleweed in 500 easy steps

Intro For a better development experience I needed to set up Wordpress locally on my Tumbleweed machine, which was somewhat different than the Ubuntu that I brought the site from. It wasn’t really 500 steps, but does have some gotchas and require some time to get right. Prerequisites Have a version of the WordPress site running somewhere on server that you can access. You need a mysqldump of its db and a copy of its complete file structure.