Category: Possibly useful
-
HDD Swap on A1278 MacBook Pro
My MacBook died, I guess about three years ago. It was randomly difficult for a week or so, but then just behaving as if it had no hard drive at all. It’s been in a drawer ever since waiting for me to replace the hard drive and see if I could sell it, which I…
-
HP EliteDesk 800 G2 Memory Upgrade
The hardware engineering of these corporate world mini-PCs is really nice. I swapped out the RAM today to bump my main machine up to 32GB from 16GB. It was a straightforward task – no screwdrivers, no drama. To open the machine up, there is a single large screw on the back that can be undone…
-
Problems mounting network share at boot
I had Jellyfin working nicely in an LXC container in Proxmox, but could not get Tailscale working in the container. Since this is going to be an important part of accessing my media away from home, I decided it was probably worth the extra bulk to run JellyFin in a VM. Following my own instructions,…
-
Accessing a Synology NAS from Linux
I picked up a Synology DS216j NAS from eBay to use for storage for the rapidly growing home lab. The eventual plan is that as well as my VM backups, it will host the media library, and eventually (when this has all proved itself reasonably bullet-proof) my current DropBox contents. That won’t all fit on…
-
External USB Drives in Linux
Many modern Linux distros will auto-mount USB drives – they just pop up in the graphical file manager as users would expect. When you’re running server, older, or smaller versions, that’s probably not going to be the case, and you’ll have to do it old school. Let’s look at some basics. lsblk will list the…
-
ssh key login on VPS
Due to potential brute force attacks, it’s a good idea to turn off password access via shh and instead rely on ssh keys. In this post, I’ll run through that process. Generating your key On a mac (or actually most *ix systems), your ssh keys live in the .ssh directory inside the users home directory.…
-
Functions in JavaScript
As with other languages, functions are a little lumps of code with their own scope. They can optionally take some arguments, and optionally return a value. In JavaScript they often have names, can be passed around as types and have a condensed form suitable for functional programming. Scope Arguments are passed in by value so…
-
HTML 001
A HTML file is a text file that can be displayed in a web browser. It is marked up in the sense that tags are applied to the text to signify the purpose of that text in the structure of the document. For example: The <h1> tag tells the browser that Greetings is a heading.…
-
Sharing is caring
Continuing on with the demo project from yesterday, in which we used the ImageRenderer class to turn a view into an image, today we want to let the user share it somehow. Typically, apps have a button using the square.and.arrow.up SF Symbol to share something from the current screen. It’s probably not an accident that…
-
ImageRenderer()
ImageRenderer() is a SwiftUI class that creates an image from a view. You just initialize it with the view, then extract a cgImage (Core Graphics) or uiImage that can be cast to a SwiftUI Image. I’ll need a view to work with, so here it is; a crude version of my behaviour ticket. Here it…