Finding the sun

(February 2025)

It’s been grey and overcast here for a while. Last Saturday I simply couldn’t take it anymore. Something had to be done! So I put on my hiking boots, and went up a mountain. If the sun didn’t come to me, I would just have to go and
find the sun!

The Brünnstein is a not-terribly-high mountain nearby, peaking at 1634m. I picked it because a) I hadn’t been there before, and b) the relevant apps offered a tour that looked
like what I wanted.

When I parked the car at the trailhead, everything was still depressively grey. Not so much weather, more like an absence of weather. The path soon led me into the forest, and took on a substantial grade.

There was still a lot of snow on the ground, and I was happy to have my trekking poles. The forest felt a little mysterious. Finally, I approached the upper edge of the fog that’s been plagueing us for weeks:

Hiking into the sunlight was magical. The rays on my face felt great after such a long time. And the view above the clouds was beautiful:

There are two routes to the summit. One is a very easy via ferrata. I had brought a band sling and a couple of carabiners, so I could improvise a climbing harness. But I’m not a very experienced mountaineer, and all that snow on the ground didn’t inspire confidence.

So I decided to save the via ferrata for spring, and took the easier — if slightly longer — path to the summit. This turned out to also be something of a climb. Not really dangerous or difficult, but interesting enough that the local hiking club had fixed a bunch of substantial steel cables to the rocks,
so climbers could secure themselves.

Arriving at the summit was just perfect. I mean, look at this view!

The mountain has two peaks. The one that’s visited most is what you see in the picture, just by the little chapel. The actual, slightly higher peak (by maybe 2 meters, if that) is a little away over a ridge. I dithered whether I should
risk the snow-covered, narrow ridge. In the end I decided that I would be really annoyed with myself if I didn’t. So I went, and it was fine!

I went home the way I had come. Only much happier. Mountains are good for the soul.

Freeing up disk space on Debian

[This post is above all for my own reference, so I’ll know what to do the next time this problem occurs.]

My Thinkpad’s SSD has an impolite tendency to run out of disk space, even though I might not really be adding lots of data. It seems to be mostly cruft that Debian accumulates, perhaps out of a desire for thorough record-keeping.

Looking for ways to free up disk space, I found this StackExchange post. It has bunch of ways for giving my hard drive a good scrub.

Let’s see what they do!

Helpful commands

  1. Start by emptying your Trash bin.

2. Clean up logs – this freed about 3GB of disk space.

sudo journalctl --vacuum-size=300M # reduces the logs to 300 MB

This freed about 3GB of disk space.

More log cleaning. Did not have any visible impact:

sudo logrotate /etc/logrotate.conf # compresses or (?) deletes system logs

3. Delete cached packages. I did this before starting a more systematic analysis, so I can’t say how much space it freed up. But it was easily more than one GB:

sudo apt clean # deletes packages that were cached for installation

4. Remove unused packages. Freed up a cool 1.9 GB:

sudo apt autoremove # removes unused packages

That’s all the straightforward commands that the linked post provided.

Finding large files

In addition, it told me how to find large (<100MB) files, so that I can check whether I want to delete them:

sudo find / -mount -type f -size +100M -exec du -h {} \; | sort -n

But most of the results looked like they were at least somewhat important, so I didn’t actually go and delete any of them.

Remember to floss regularly

Maybe I should simply put all these commands into a little script, and run that as a cron job? Once a month or so?

Airdrop for the rest of us


Serving files from an iPhone via http

Those of us living in Apple’s golden cage know that the fruity phones offer a pretty decent user experience. But try rattling the bars, and you’ll find out that Cupertino has done a solid job of locking you into their system.

One of the nicer functionalities of iOS is Airdrop. This lets us transfer files between devices over Bluetooth. It’s as easy as sending a file by Signal. But disappointingly, it only works with Apple devices. This both a fact of life, and really stupid.1

For example, I sometimes find interesting ebooks on the internet. My ebook reader is in the non-aligned camp, because what I’m reading is honestly none of Jeff Bezos’ fucking business. When I find a book I like, e.g. on Project Gutenberg, I often download it to my phone.

So, how do I transfer that epub file to my ebook reader?

http to the rescue

I could just copy it to my computer, connect the ebook reader with a cable, and copy it over. This works, but it’s cumbersome: When I get time to read, I’ve usually just managed to tear myself away from the computer. So I don’t want to turn around and fire up the time-wasting box again.

Much better to waste time in a more interesting way! Turns out it’s really not hard to start a http server on my iPhone, direct the ebook reader’s browser to download the epub file from there.

(Of course, this works with literally any sort of file. Let’s just stick with my use case for now for simplicity’s sake.)

Important: This will only work if your iPhone and your ebook reader are on the same wifi network. If your reader doesn’t have wifi, then sorry, it’s cables for you.

Preparations

You only need to do this stuff the first time. We’re following these instructions.

On the iPhone:

  1. download the iSH app. It’s a Linux shell, more or less.
  2. start iSH, and install Python 3:

    apk add python3

  3. open your Files app, and hit “Browse”. In the top right corner there’s a circle with three little dots in it. A menu pops up, and you select “Edit”. This will show you a bunch of places where your phone can store files, iSH among them. Make sure iSH has a green toggle.

=== ADDED ===

Instead of installing Python and then using the http.server package, you can also just install darkhttpd, like so (still in iSH):

apk add darkhttpd

and then run it with

darkhttpd .

The dot is for the current (root) folder. If you’re feeling fancy, use another path where your files are stored.

(Thanks jacksonchen666 for the pointer!)

=== end of addition ===

Oh, and download the epub file you want to transfer to your reader. It doesn’t matter where you get it from, nobody’s judging you.

Transferring files

  1. On your iPhone, figure out where the downloaded file is stored. Just open the Files app, click on “Recent”, and it’ll probably sit right at the top.
  2. Copy the epub file to iSH’s root directory:
    • Long press on the file > copy.
    • Then hit “Browse”, and under “Locations”, you should see “iSH”.
    • Tap on “iSH”, then on “root”
    • long press somewhere on the empty screen. A context menu pops up, and you select “paste”. That’s it.
  3. On your iPhone, open iSH and fire up the web server:

    python3 -m http.server

If all is well, you should now get a message in iSH like “Serving HTTP on 0.0.0.0 port 8000”.

Do you see it? Congratulations, you’re running a web server on your phone!

But where, in network terms, is your phone? Let’s go find out your local IP address. On your iPhone:

  1. Open Settings
  2. Tap on “Wifi”. You’ll see the network you’re connected to. There’s a little “i” in a circle. Tap that, scroll down a bit, and you’ll see your phone’s local IP address. Mine is currently 192.168.178.47. Yours should look similar.

Now let’s transfer the file.

On your ebook reader, fire up the web browser. In the address bar, enter

http://< your IP address >:8000

for example

http://192.168.178.47:8000

Then hit “Enter”. You should now see a very plain directory listing that contains the epub file!

Just tap on the file to download it. My ebook reader decided to store it in its library and open it right away; I’m not sure how yours will do it. But you’ll figure it out.

Done!

Congratulations! You did it. That’s all. Repeat the steps from the “Transferring files” section as often as you like.

When you’re done, go to iSH on your phone, tap “^” and then “Z” to stop the server.

Of course, this process isn’t limited to ebooks. Open protocols like http are among the finer things in life, right up there with food and sex. Enjoy them!

You can just put any file in iSH’s root directory, and access it from any device on your network that speaks http.

Feedback, please

Did this work for you? Cool!

Oh, it didn’t work? Please let me know on the Fediverse, and I’ll see what I can do to help.I’m fully aware of how capitalism works. We’re writing from the user’s perspective here, ok?

  1. I’m fully aware of how capitalism works. We’re writing from the user’s perspective here, ok? ↩︎