User_4574's miniblog

Where thoughts go to die

Home Archives Feed Post
HP Ultraslim Dock Linux Audio [Permalink] 24-03-2021 18:50 UTC

I've had an issue for some years regarding the line in and out sockets on my HP dock, where Linux hasn't been able to detect them and so I've been using the headphone jack on the laptop instead.

I finally worked this out so I'm documenting it for future me and also anyone else.

The answer is in these three lines of modprobe config. I don't know what they do, as with all things surrounding sound in Linux, it's fairly magic. YMMV.

options snd_hda_intel model=hp-dock
options snd_hda_intel beep_mode=0
options snd_hda_intel enable_msi=1

Review: Silent Eye [Permalink] 28-07-2020 19:57 UTC

I recently watched Silent Eye on Amazon Prime. Here's a short review from worst to best. Prepare for unqualified criticism.

5

Episode 3: The Unlocking Thought

Here's some cool tech that does a great job helping people with an important issue. Also, the protagonist has an alcohol problem and his girlfriend breaks up with him because he's an arse. These two arcs are only barely linked.

4

Episode 2: ReGen

In the future we have magic that can bring people back from the dead. It's not clear if this is widely available to the public. Also some people are stealing bitcoin. It's not clear why.


The way they tell the story from end to start is cool. I always enjoy that.

3

Episode 5: The Sleep House

This one actually had a coherent premise. Too bad it was just world building and there wasn't any real plot. Good premise though.

2

Episode 4: The Museum of Me

Seems like a pretty evil thing to do to someone, but well plotted and decent characters make the plot surprisingly compelling.

1

Episode 1: You Have Been Chosen

Of all five episodes, this one actually had a decent premise and interesting plot. Leaving some open questions about the the plot device keeps the viewer interested. It has a decent, unconventional antagonist with unclear motives. It also comes back as a plot point in episode 4.
Simple Timer [Permalink] 14-03-2019 11:37 UTC

I needed a simple timer, and came up with this handy CLIism, that prints the time between two successive pushes of Enter.
$ time read↲


real 0m3.443s
user 0m0.000s
sys 0m0.000s

IOS Games [Permalink] 20-11-2017 13:32 UTC

There are a few games I play (safely of course!) on IOS devices to amuse me while I work. They are:

IOS Golf

Work out how to shorten the command to the fewest possible characters whilst remaining unambiguous.

The Game of Threes

Originally the aim was to express the command in a way such that each word was three characters long. This can be generalised to all words having the same number of characters,
to prevent ambiguity and make it work for short keywords.

The Sentence Game

Form the command into a fun sentence. For example show standby brie, since the concept of having backup cheese is amusing at least to me.

Let me know if you have any others!
Byteback Dynamic Excludes [Permalink] 26-09-2016 21:13 UTC

Bytemark make a decent backup tool here.

It has a file /etc/byteback/excludes in which you can list directories to be excluded. This is great, but it would be more useful if I could identify this in the directory in question. Byteback... doesn't do this.

So I did. :D

I threw together the following exceptionally simple bash script which achieves this.

#!/bin/bash

if [[ $EUID -ne 0 ]]; then
echo "Need to be root" >&2
exit 1
fi

echo "Building dynamic exclude list..."
find / -name '.do_not_backup' | xargs dirname > /etc/byteback/excludes

echo "Merging static includes..."
cat /etc/byteback/excludes.merge >> /etc/byteback/excludes

echo "Running byteback..."
byteback-backup $*

In order for this to work, you need to touch .do_not_backup in any directory, and that directory won't get backed up. You can continue using /etc/byteback/excludes.merge as a static excludes list.

You just need to use this script instead of byteback-backup, and the $* means it will take and pass on the arguments to the byteback-backup call.
Older