April 26th 2026 - Things I Worked On

Poker Equity Calculator

I finished a web version of a poker equity calculator I built about 11 years ago. In a few days I'll post the code on github and share the link to the repo.

For now, you can play around with it here: Poker Equity Calculator

Bash script to print files with names

I created a bash script to print files along with their file names. I find this easier to work with when sharing mutliple files with LLMs.

for file in *; do
    if [ -f "$file" ]; then
        echo "---"
        echo "[$file]"
        cat "$file"
        echo -e "---\n"
    fi
done

Outputs the following:

---
[FILE_NAME]
[CONTENTS]
---

Added extracting date from file name for blog post

I want to be able to extract the date of a blog post directly from the file name.

This does a regex search to see if the file name starts with a date. If it does, it uses that for the post date. Otherwise, it uses the current date.

(defun my/blog--create-post-date (file-name)
  "Return a string representing the date in blog post format. If
FILE-NAME starts with YYYY-MM-DD, use that date. Otherwise, use
current date."
  (let* ((time (if (and file-name
                        (string-match
             "^\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\)_"
             file-name))
                   (encode-time 0 0 0
                                (string-to-number
                                 (match-string 3 file-name))
                                (string-to-number
                                 (match-string 2 file-name))
                                (string-to-number
                                 (match-string 1 file-name)))
                 (current-time)))
         (day (string-to-number (format-time-string "%d" time)))
         (suffix (cond ((memq day '(1 21 31)) "st")
                       ((memq day '(2 22))    "nd")
                       ((memq day '(3 23))    "rd")
                       (t                     "th"))))
    (format-time-string (format "%%B %d%s %%Y" day suffix) time)))