It's possible to drag and drop a link from the Firefox download list directly onto a webpage!
Sander van Dragt's Notes
-
-
Introducing HTMXpress = HTMX for WordPress
I have recently been interested in using HTMX, but there's not been any activity within the WordPress community as far as I can see. I hope to change that with HTMXpress (pronounced as HTM express).
HTMX allows you to annotate dynamic script style behaviour via custom HTML properties, using progressive enhancement. Perhaps you're familiar with Hotwire (ruby on rails) or Intercooler.js (htmx predecessor).
The approach
By using the Rewrite Endpoints API to create a custom endpoint; and a bit of custom template logic, we can output a serverside partial or custom theme template.
Using this setup, WordPress can leverage HTML over the wire solutions such as HTMX.
HTMX then allows us to do dynamic serverside based rendering; live search and other features without the overhead and complexity of reactive JavaScript frameworks, whilst benefiting from trusted object and full page caching solutions.
Currently it's a prototype. I'll be blogging more about progress as things go on.
-
Still have to find a headless WordPress site that was more maintainable after a year of work than a serverside one
-
Enable Playlist Radio on Spotify's Liked Songs tracks
I tested and created a IFTTT recipe for backing up Liked Songs' tracks : https://ifttt.com/applets/iMnNGt3V-backup-spotify-likes.
Despite the incorrect labelling "Saving a spotify track" means liking it, not "downloading to your device". So you can add it to another Spotify playlist.
To get historical likes, cmd-a / ctrl-a (or equivalent) all Liked Songs tracks and drag them into the backup playlist.
This enables playlist options such as Playlist Radio giving you similar songs to the ones in the backup playlist.
-
Two slices please
-
How to export Safari's Reading List into other services
I'm always collecting interesting links to read later, but like to try out a bunch of services. It's very easy to add links to Safari's reading list (particulary on iOS), so I used it quite a bit. Now I've switched to Pocket, I'd like to get those links out.
The thing you might not know is that Reading List items are stored as bookmarks.
Pocket can import browser bookmarks, but you might not want to import non Reading List items. This is how you do that:
Step by step
- In Safari, File > Export > Bookmarks. Save all your bookmarks, this is the disaster recovery backup.
- Delete all your non-reading list items.
- Export the bookmarks again, as
reading-list.html. Delete them from Safari. - Import the reading-list bookmark file into Pocket.
If you use Safari for regular bookmarks, restore the browser bookmarks without the reading list items:
- Import the bookmarks you exported in step 1.
- Delete your reading list items.
Bonus
If you have other browsers with bookmarks you want to add to your reading list, you can use the same idea to get them into pocket, using Safari as a way to prune any bookmarks you don't want to import.
-
Truly Muting Gmail Conversations
You might have noticed that after muting a Gmail conversation it pops back into the inbox.
Google says:
“Muted conversations will only pop back into your inbox ready for your attention if a new message in the conversation is addressed to you and no one else, or if you’re added to the ‘To’ or ‘CC’ line in a new message.”
If you find conversations are popping back into the inbox you can create a new Apps Script (from Google Drive) with the following contents and add a Timed project trigger (most easily available from the classic editor) to run it every 15 minutes:
function archiveMuted() { var threads = GmailApp.search('is:muted',0,100); GmailApp.moveThreadsToArchive(threads); }Adjust the number 100 to the amount of muted email threads you expect in your inbox every 15 minutes.
-
Global node packages
This is non-obvious, but might save you some time when using node based tooling:
- When installing a package globally in system node it works across all versions of node ✅.
- When installing it globally in a non-system node, it works only in that particular version of node.
-
Managing homebrew package updates
I've taken to upgrade
homebrewpackages once a week on Monday morning, and replacing any packages that cause issues in my workflow and managing them some other way. This seems to work quite well, and is a better workflow than waiting until a new package needs to be installed and then breaking lots of things. -
In the terminal the unix timestamp can be listed by
date +%s
