Created a HTMX PHP sandbox to get started really easily. Feedback welcome. Might add some convenience functions https://github.com/svandragt/htmx-php-sandbox #projects
Sander van Dragt's Notes
-
-
I've updated my one stop system update script to remove unused Flatpaks. #linux #projects
-
What would it take to make writing vanilla JavaScript more pleasant? After reviewing the code for my blogging engine Lamb I concluded:
Most of the code adding interactivity to personal websites comes down to running code after the page has loaded; niceties to query the DOM and hook into events. There's probably more but this is a start. The result is shorthand.js. Hint: it's not dissimilar to jQuery, but you can fully learn it in 5 minutes.
Which simplifies code to:
onLoaded(() => { const forms = $$('form.form-delete') forms?.forEach($form => $form.on('submit', ev => { cancel(ev) let confirmed = confirm(`Really delete status ${ev.target.dataset.id}?`) if (!confirmed) return ev.target.submit() })) })This is just a prototype and will evolve.
-
If you're using the Anytype (current version at the time of writing: 0.37.3) AppImage and made a .desktop file to launch it, here are a few tweaks that integrate it into your system better.
You may want to use a program like Desktopius to edit the .desktop file.

Prevent two dock icons
If you see one item for the AppImage and one for the application window in the Dock, add
StartupWMClass=anytypeand these will be combined. This value is the result of runningxprop WM_CLASSand clicking on the Anytype main window.Fix the icon
If you see the generic icon, extract the icon to a path and update
Icon=/path/to/anytype.png(replacing the path to the directory where you will extract the icon).To extract the icon from the AppImage do the following:
$ cd /tmp $ mkdir anytype && cd anytype $ /path/to/Anytype.AppImage --appimage-extract .... $ cp squashfs-root/usr/share/icons/hicolor/1024x1024/apps/anytype.png /path/to/anytype.png -
PHP-Activate 0.3.1
I've released php-activate 0.3.1, a PHP project version manager for Linux systems using native PHP packages.
Made for those working with multiple projects using a variety of PHP versions, this script will switch to the correct PHP version for the local shell session. It does not require sudo, so even works in IDEs.
The latest version contains a few small changes:
- Eliminate the activate_php:export:20: invalid option(s) output. Exporting the php function is not needed as we source the script into the current shell session.
- Harden the script by implementing shellscript linting recommendations.
- Readme update.
-
PHP-Activate 0.3.0
I've released php-activate 0.3.0, a PHP project version manager for Linux systems using native PHP packages.
Made for those working with multiple projects using a variety of PHP versions, this script will switch to the correct PHP version for the local shell session. It does not require sudo, so even works in IDEs.
The latest version drops support for the Fish shell again, and fixes compatibility with direnv. The correct PHP version is activated when changing into a project directory that is setup according to the README. #projects #phpactivate
-
I experimented with _hyperscript to replace the little JS enhancements on the Lamb microblog over the weekend. After a day I had all the scripts replaced with clearer code in about half the lines of the previous JavaScript. It sounds like a success, however I rolled it all back. This is because _hyperscript requires a 100KB library, whereas the 3KB JavaScript it replaces does not. As Lamb is a minimal blogging system, that's the vast majority of the pagesize. #technology
-
Lamb image test
Image upload support has landed in the Lamb repo:
Drag images into the composer textarea and they will be automatically uploaded behind the scenes and inserted into the post as markdown, similar to how GitHub works:

This has been the main missing piece for me, so I'm very pleased. #lamb #projects
-
Ashley Belanger writes for Ars Technica Apple gets 36% cut of Safari deal with Google as default search:
Statista reported that Google's advertising revenue was $224 billion in 2022, and based on that, Engadget estimated that Apple likely gets paid in the tens of billions of dollars for Google's default Safari placements.
Meanwhile Slack, Discord and others continue not to benefit from an Electron commit that wasn't properly reviewed setting Search with Google as the default #technology #privacy
-
There is no queue, I play one song: Spotify adds the next song in the playlist in the queue. There is one item in the queue, I add another song to the queue: Spotify replaces the queue with the song.