Well, this is a fun one from Adam Douglas. I knew most of these, but a couple are new. And that video? Definitely new to me. š
The system uptime can be a useful metric to determine when was the last time a computer or device was booted when paired with an issue or incident. By its self it is not always a vital metric, even though historically some wish to achieve the longest uptime possible. It all depends on the circumstances. No matter what your reasoning might be, letās take a look at the definition of system uptime, the test environment, assumptions, the various methods used to obtain a GNU/Linux or Unix operating systemās uptime and finally the conclusion with a fun entertaining bonus.
If youāre the kind of person I imagine would find and read this, youāve read a ton of words already on the concepts of small web, indie web, and personal websites. Iām not going to pretend that my post is the one you have been waiting for on the topic, but I do want to say a couple things about the inspiration Iāve received from some of these people.
Iāve had my own website for years and years in various incarnations. No one ever reads it, to the best of my knowledge, and (like my podcasts) Iām kind of shouting into the void. But I donāt care, and hereās why:
I love the indie web. I love the modern take on personal websites. They are about linking and sharing and going down rabbit holes in a way that the way USED to be about, but now with modern design and personal touches of whimsy. In a way, as terrible as the mainstream web has become, infected with an almost certainly incurable cancer of advertising-driven enshiteification (sic), the indie web, the small web, the personal web is better than ever. And it makes the internet better than ever too, if you just focus your attention.
Nowhere is this better presented than Rachelās The internet used to be fun project, which Iāve spotlighted in my current Cool Site Spotlight on my Links page. In case youāre a doubter, or you just havenāt noticed yet that many good people are actively trying to bring back the soul of the internet, Rachelās got link after link of smart person after smart person talking about this trend and its importance.
And it is important, dammit. The web doesnāt have to be total garbage. The people that have ruined everything with advertising technology that makes the web impossible to read and allows bad actors to stuff it full of malware donāt care about you, and itās time to stop caring about them. To hell with them and the dumb billion dollar horsey they rode in on. Itās time to focus on the good and @#$@ those other guys and their terrible way of making a living.1
Anyway, hereās to Rachel and hereās to all the sites she links to. Letās all link to them, and letās all link to each other.
Did you know my Links page has an ever-changing Cool Site Spotlight? Iāve mentioned it tangentially before, but I want to mention both it and my Links page specifically now because I think both are pretty cool.
I started my Links page in January of 2024 with the intention of making it a blogroll, but itās much more than that now. For one thing, right at the top is a Cool Site Spotlight highlighting one site Iāve stumbled across that I think is unusually neat. I rotate entries out into the Cool Sites Archive section of the Links page as I highlight a new one.
Not only does this keep me interested and looking around me, it should serve as a good idea and interest generator for my readers too.
If the web is ever going to be cool again, this is how it starts: finding and linking to things that make it a better place.
Hereās a pitch for you: howād you like to listen to a podcast that is both fascinating from the perspective of being about tech nerdery and podcasts in general AND that is also part of a PhD project? There can only be one that fits this definition, and itās Martin Feldās Really Specific Stories podcast.
If you havenāt listened, you should. Donāt start with the latest episode though (featuring yours truly), start from the beginning or pick any other episode at random and get a feel for what this project is all about.
I really enjoy the intentional way that Martin delves into the topic of what podcasts mean to people and how they interact with and/or produce them. He digs deeply into peopleās relationships with podcasting in a way that I havenāt heard anywhere else.
Iām sure Adam Curry has uttered more words on the concept of podcasting, but Iād be hard pressed to imagine any of it is as illuminating or focused on understanding what podcasting is all about as Really Specific Stories is.
One of the brilliant features of macOS is its built-in screenshot tools. Not all operating systems are as aware of the fact that people need to take screenshots and edit and annotate them quickly as macOS appears to be. Even so, many excellent third-party utilities exist to take this to eleven.
The App ā ScreenFloat
If I start talking about the options and making comparisons, Iām going to get into a holy war and I donāt want that.1 Therefore, Iām treating my coverage of macOS screenshot utilities like itās a Highlander. THERE CAN BE ONLY ONE! And that oneās name is ScreenFloat.
ScreenFloat has a lot of ideas, and those ideas are translated into features. It can be a bit overwhelming, but in reality itās fairly easy to wrap your head around the features youāll use most, and then you can dig into customizing the app and really getting some work done. That second point is important because when I first started using ScreenFloat, I was missing some of my workflow from Shottr. But the good news is I was able to get back quick annotation and copy to clipboard functionality with ScreenFloat just by making a couple of tweaks.
The Premise
ScreenFloatās main premise is that you may want to take a screenshot and then float it above other windows so you can use it as a reference or so that you can drag it easily into other apps. The good news is that this can be very helpful. The bad news is that sometimes floating windows get in the way. The good news is that you can close a floating window with a keyboard shortcut or by clicking on its window close control, and ScreenFloat will keep it in the Shots Browser to be recalled at any time.
If you use the keyboard shortcut to close (actually hide) the floating screenshot, you can open it again (unhide, technically) with the same keyboard shortcut. Once you close by clicking the window close control, however, youāll have to open the Shots Browser window and double-click it to get it back into Floating Shot mode.
The Features
Floating Shots can have actions performed on them ā annotating, exporting, cropping, sharing, dragging, and dropping, and more.
Dragging and Dropping
Dragging and dropping and super quick file saving can be performed by the Floating Shotās File Drag Control2.
This lets you quickly drag the screenshot into Messages , an email, or even into Finder to quick save the image to disk.
Note that you can still export the file with options by clicking on the Floating Shotās Action Menu3, clicking Export⦠and making some simple choices.
Speaking of that Action Menuā¦
Action Menu
The Action Menu has a lot of the things youād expect ā Copy, Open Copy With, Export, Crop, Annotate, and more.
One of the āmoreā things is Data Detection. ScreenFloat lets you detect text and copy it or redact it as desired. Itās really pretty magical.
Another thing I use all the time in the Action Menu is Annotate. The annotation options are comprehensive and are customizable before and after creating an annotation. For example, you can double click the rectangle outline tool to customize it or you can just click it once, draw a rectangle, and then click the Select tool to edit the rectangle youāve just drawn. This same methodology holds true for all the annotation tools: Draw, Rectangle, Oval, Line, Arrow, Star, Checkmark, X-mark, Text, Numbered List, Callout, and Redact.
Numbered List isnāt exactly what it sounds like. It lets you drop numbers on an image in order to call out steps or set the order of items of interest. If youāre making a screenshot to show someone the order to click things on a UI, this is what you want.
Redact lets you redact with a solid color, complete with the ability to set the color from swatches or a color picker, or the common pixelation redaction, or with a strange gradient looking blur effect that I donāt think Iāll ever use. This is in addition to the Data Detection and its ability to redact, although the redactions are the same style and can also be edited in the same way as the manual redactions by selecting them with the Select tool.
Double-Click Workflows
The eagle-eyed amongst you may have noticed that Annotate is stuck in the Action Menu and therefore it takes extra clicking after grabbing a screenshot to be able to annotate it. Other apps, like Shottr, drop you into a view that shows you annotation tools immediately after capturing the screenshot. The good news is, ScreenFloat lets you create double-click workflows that get you very close to that simplicity.
In ScreenFloatās settings, on the Floating Shots tab, you can set actions that occur when double-clicking with or without modifier keys. In my case, if I double-click a floating shot without modifiers, it copies the image to the clipboard. If I double-click it while holding command, it immediately jumps into Annotate mode without me having to use the Action Menu to select it.
I also have modifiers to double-click and resize the floating window up or down by 50%.
Itās a very clever and endlessly customizable way to create shortcuts to editing actions that youāll use all the time.
Shots Browser
Floating screen shots are one thing, but what about if you want to recall one, or annotate it or export or otherwise save it later? ScreenFloat has you covered. Every snapshot you take goes into the Shots Browser, which can be recalled at any time with a keyboard shortcut, such as ā-ā§-1.
With Shots Browser, you can double-click an image to make it a Floating Shot again, so you can annotate or do whatever you want with it. But you can also drag images straight from the Shots Browser to other apps, which makes it handy for taking a bunch of screenshots for, say, a blog post, closing the resulting Floating Shot, and then getting them from the Shots Browser later when youāre ready to use them in your writing.
The Shots Browser feature is really nice if youāre using screenshots to document a procedure and you want to get all your shots in one place to edit and choose from later.
You can also go really crazy and create folders, smart folders, tags, descriptions, and ratings. Like I said, ScreenFloat does not skimp on features.
Export Options
Of course besides the usual drag and drop and open copy in options, you can export a Floating Shot using the Actions menu and Choosing Export. You can choose options related to naming, format, whether or not to include annotations, size, alpha, and whether or not to reduce dpi resolution.
The Conclusion
Honestly, what pushed me back to using ScreenFloat wholeheartedly was discovering the customization options for all the annotations and the double-click workflows. Being able to quickly copy something to the clipboard or jump right into annotating it are things I canāt live without.
ScreenFloat is a very powerful, very customizable screenshot tool for the Mac that I think trounces most of the competition. The other one Iād recommend is Shottr, which takes a much simpler but still feature-rich approach. Itās another great application. For me though, ScreenFloat wins easily with its Shots Browser, Floating Shots, and easy customization with workflows and tool options.
I previously wrote about using Raycast script commands to switch default browsers. Raycast script commands are really good for scripting all kinds of other things too. One example is a Python script command I created yesterday for the purpose of grabbing a couple values from a JSON file and formatting them into a markdown hyperlink and putting it on the clipboard.
On my siteās Links page, I have a Cool Site Spotlight section at the top which I use to showcase some cool site or other for a short, random period of time. The data for this Cool Site Spotlight is saved in a JSON file that looks like this:
"Description":"What is a color space? Why should you care? Do you like interactive visualizations to help you learn things? Do you like cool sites regardless of topic? If the answer to at least one of these questions is \"YEAH, I LIKE THAT!!!!!?!!!\", then you need to spend some time here.",
You can probably argue about why I used a JSON file for this section, but basically itās because the view is complicated enough that letting Astro create it from Markdown wasnāt going to work and I did not want to mix data and UI in my Spotlight.astro component. Having an Astro component map JSON file data, on the other hand, is super easy and lets me keep the site info separate from the Cool Site Spotlight UI implementation.
Everything else in the Links page comes from a standard markdown content page located in src/content/links/links.md. The Cool Sites section of the Links page comes from this portion of links.md:
src/content/links/links.md
1
## Cool Sites
2
3
-[Lene Saile, developer and designer living in Madrid](https://www.lenesaile.com/)
4
-[omg.lol - A lovable web page and email address, just for you](https://home.omg.lol/)
-[VKC.sh | Veronica Explains ā Veronica explains even more](https://vkc.sh/)
8
-[The Yesterweb - Reclaiming the Internet](https://yesterweb.org/)
When I want to change the site that Iām spotlighting, I put the currently spotlighted site in this section of links.md and then put the new site data in the JSON file. Up until now, this has meant manually copying the Title value and the Site value out of spotlight.json and manually writing out the markdown link in the Cool Sites section of links.md.
Yesterday I finally realized I was tired of copying twice and pasting twice and typing all the markdown formatting characters just to move a link to a website from one part of my Links page to another. My solution was to create a Raycast script command that does it for me.
I created my script command the standard way by using the Raycast āCreate Script Commandā command and filling in some information. I chose the Python template, set it to Full Output just so I can see what the transformation looks like, gave it the title Spotlight Site to Cool Site, which is what this command will show up in Raycast as, and gave it a description and a package name.
I donāt actually know what the package name does for me, but I like to set similar items to the same Package Name just to be sure. All script commands that are for working on the website go in the Website package name.
This creates a relatively empty command script in the directory of my choosing (I put them all in a folder called ~/Scripts/Raycast/script commands) containing one line of Python. I tend to edit my script commands in BBEdit (as opposed to VSCode, which I use for website development and some other types of programming), so I fired it up and made the following very small, very simple Python script.
A full half of it is headers for things Raycast needs to know. The other half is the Python script. Itās very simple.
First it opens /Users/scott/Sites/scottwillsey/src/data/spotlight.json for reading and loads the data as JSON. It then grabs the values for the āSiteā and āTitleā keys. It then creates a variable called markdown_link formatted as - [{title}]({site}) with those values inserted correctly to create a markdown hyperlink, and copies that to the clipboard using pyperclip.copy.
You can install pyperclip using pip, which brings up a whole thing about Python and how you install it and how that affects importing things using pip, but I wonāt go there today. But suffice it to say that the Python world is a mess when it comes to ease of use and maintainability. A whole lot of someones should be super ashamed of themselves for letting this situation occur and then fester.
Suffice it to say that you need to install pyperclip on your Mac for this to work. Good luck.
To run the command script, I hit the Raycast hotkey (ā-, in my case), and start typing āSpotlightā. When I see what I want, I hit Return if itās the first in the list, or ā and the number of its place in the list if not. Bam ā it executes and I have my link in my clipboard.
This is an extremely simple example of a Raycast script command, but it illustrates that you can very easily perform all kinds of scripted actions without having to write a full Raycast extension or without having to open the Finder or terminal, go to a script directory, and running a script manually. Running a command script through Raycast will always be quicker.
Not so very long ago, I wrote about using remark and a script called remark-modified-time.mjs to update a pageās front matter Date value for Auto-Generated Last Modified Dates in Astro. This approach worked pretty well until I moved the content for my /Uses page out of a markdown file and into a json file. I didnāt want to have to keep modifying essentially an associated empty markdown file to get the last modified date to change.
What I wanted was a way to see if the json file itself had changed, and then enter THAT date into the /Uses markdown file front matter. In essence, change one file, and another one gets its updated timestamp. This would give me a self-updating last modified date value for everything and I wouldnāt have to remember to manually change anything to make it happen.
Git hooks let you run a script when some git action occurs. One git related action that occurs all the time is the git commit. Git commit turns out to be a very good time to look at when files were last modified, since gitās entire job is paying attention to when and how files are modified. The git hook to use if you want it to happen when you perform a git commit is called pre-commit.
Although itās called pre-commit, it happens during a commit but before you enter the commit message. It can be used to verify commits before allowing them to happen, but instead I use it to modify files and commit those new changes along with the existing ones.
Implementing a pre-commit git hook is simple. Go into your projectās .git/hooks directory and create a file called pre-commit, with no file extension. There should already be a file in there called pre-commit.sample ā you can either rename it without the extension and edit it, or just create a new one with the correct name.
Here are the contents of my .git/hooks/pre-commit file:
Two points if you noticed that itās just a bash script and that it clearly is running a git command to see what files have changed since the last commit!
The output of that command is piped to grep to look to see if any of the modified files are src/content/links/links.md, src/content/now/now.md, src/content/pins/pins.md, src/data/uses.json, or src/data/spotlight.json.1
Once it finds any modified files that match my list, it uses awk and sed to find the front matter and change the date value to gitās modified timestamp. I leave learning all about awk and sed as an exercise for the reader āĀ see you in about 10 years.
For the most part, the files that are modified are the files that get their front matter date value updated, except in the case of the two json files. If src/data/spotlight.json is modified, src/content/links/links.md gets its timestamp instead. And if src/data/uses.json is changed, src/content/uses/uses.md gets that timestamp in its front matter date field.
Another way to look at it is that if any of the markdown files Iām looking for are updated, they get their timestamp set accordingly. In addition, links.md also gets an updated timestamp if src/data/spotlight.json is modified. This is because both links.md and spotlight.json contain data that shows up on Links.
But in the case of my /Uses page, I never look to see if src/content/uses/uses.md gets updated. Thatās because Iām really only using it for its front matter at this point. All of the data displayed on the page itself comes from src/data/uses.json. So I only look to see if uses.json was modified, and if so, I update the timestamp in uses.md. Then I can use that value to display on the compiled page as the last modified date and time.
Thatās it. It really is that simple to implement git hooks. Theyāre sitting inside .git/hooks in your repo just waiting to be used for exciting things like telling people when you added your mouse to the list of computer hardware that you gaze at lovingly on a daily basis.