
After watching “Last Stop Coney Island” and learning that Harold Feinstein used a scanner to make One Hundred Flowers, I was inspired, so I scanned a Pringle.
After watching “Last Stop Coney Island” and learning that Harold Feinstein used a scanner to make One Hundred Flowers, I was inspired, so I scanned a Pringle.
UPDATE: I’ve had trouble getting GoAccess to parse the logs consistently after changing the date format.
I’ve been using GoAccess on the VPS running my static sites for keeping an eye on web server access logs. It works great and requires no tracking scripts. I run a cron job every five minutes to process my site logs and generate an HTML report. This is fine, but GoAccess always processes the entire log file and offers no way to filter the results. Sometimes I only want to see stats for, say, today or for the past week.
To do this, I run GoAccess on only a subset of the log file using the command line directly on the server. The GoAccess man page includes some examples using sed
so that’s where I started. The first problem I ran into was that Caddy’s log files use json by default rather than the trusty old common or combined formats. The default log format uses a UNIX timestamp for dates, so the first thing to do was to change the format to iso8601 in Caddy’s configuration, like so…
daily.baty.net {
log {
output file /home/jbaty/logs/caddy/daily.baty.net.log
format json {
time_format iso8601
}
}
}
Now I can parse the logs based on the date using sed:
#!/bin/sh
sed -n '/'$(date '+%Y\/%m\/%d' -d 'today')'/,$ p' logs/caddy/daily.baty.net.log | goaccess -a --unknowns-as-crawlers --ignore-crawlers -
Now when I run ./stats-today
on the server, I get something like this:
Check me out with my 5 whole visitors so far this morning! 😆
This was first published on daily.baty.net because I can never decided where to post stuff like this.
Ten years ago, Steven Johnson wrote The Spark File, in which he describes his process for keeping track of hunches, ideas, etc. in a single text file.
I, of course, thought this was a great idea and immediately started keeping my own spark file. It began in 2012 and I was reasonably consistent with it until 2016. After that, there was a lull, but it picked up again for a short time in 2021, after which I sort of forgot about it.
I ran into the file today and reviewing it has been quite a trip. The short version is that I’ve only done a few of the things I’d written down. This is fine since many of them are things I’m either no longer interested in or were too ambitious anyway. I have, since I last checked, completed a few of them. Crossing them off the list was fun. There are others that are still good ideas and that I may pursue.
Since the file is an org-mode file, I’ve added a capture template to my Emacs config that lets me quickly capture new entries. Now I just need some hunches or ideas to capture.
I finally put a roll through the MP yesterday. It’s been mostly digital around here lately since I got the SL2.
There are still a few people that I want to hear from that have not (yet) left Twitter, so I visit Twitter maybe once a day. Andy Bell posted the following “Boost” for the Arc browser:
[aria-label="Trending"],
[aria-label="Search and explore"],
[aria-label="Twitter Blue"],
[data-testid="DMDrawerHeader"],
[href*="promote"] {
display: none !important;
}
It takes about 10 seconds to add new boosts like the above.
I dislike Twitter, but I love Arc. Now Twitter doesn’t suck as much.
I’ve been tracking an issue with the way backlinks are displayed that affects my use of Org-roam. Someone (hwiorn) finally discovered a workaround when using Doom Emacs: delete the compiled version of org-roam-utils. Like this:
rm .config/emacs/.local/straight/build-*/org-roam/org-roam-utils.elc
Now my links show up correctly. Finally! I’ll probably need to delete the file every time I sync or update but I don’t care as long as there’s a fix. It was driving me nuts.
UPDATE: And a few hours later, it was fixed for good in this commit.
I woke up this morning and didn’t like the look of my Eleventy blog and didn’t know how to fix it, so I brought back the WordPress version, which I do like the looks of, but don’t like using. It’s a trade-off, for sure. I like comments and stats and search and plug-ins and the infinite tooling available in WordPress. I’ll never figure this out and just stick with something. You should probably ignore me. (And also unsubscribe from my RSS feed since I seem to keep flooding it with non-updates every few weeks. Sorry again about that)
I’ve been a Flickr user since 2004 and a SmugMug user for nearly as long. For some reason, I prefer looking at my photos via online galleries rather than, say, my Photos library, and both Flickr and SmugMug have helped me do that.
I’ve also kept standalone static web galleries for the odd side project, such as a memorial to my dog Leeloo. Recently, I’ve been creating more of these, so I started looking for easier or better ways of generating static web galleries from a selection of photos. There are what feels like a thousand options. Everything from giant GUI apps to the nerdiest little command line utilities.
After looking around a bit, I’ve settled on jAlbum. I didn’t expect to like it. After all, it’s from that time (2004) when software was named so that everyone knew what it was written in. And I developed an allergy to Java not long after that. Go figure!
jAlbum is surprisingly robust and capable, while still being simple to use. The defaults are mostly fine, but it lets me tweak the dickens out of it, should I want to.
I’ve only spent the morning with it, but I have created some initial galleries at static.baty.net/photos. I think it already looks fine, and I haven’t even begun to tweak it.
jAlbum has built-in (S)FTP capability for automating the process of getting everything out to my server, but it doesn’t support ssh keys so I can’t use that. I’m instead using rsync via a tiny Makefile, so all I need to do is type make
and the changes are deployed.