Posts for: #Info

Pihole Docker Upgrade Pipeline

I’ve been running pihole for a minute now, and I think I’ve devised a process for upgrading that’s short, sweet, and to the point. It provides quick upgrades and might even be something possibly automated.

So here goes.

First thing you need is to make a folder somewhere on the system that your compose file and config files will live in. Throw it anywhere, it’s your system with your security practices, I don’t really give a damn. That’s my warning for “do at your own risk, you assume all liability”. Once you have your compose file, start your container with:

[]

ComfyUI With ControlNets

So the first thing you do is a git clone https://github.com/comfyanonymous/ComfyUI. Then cd ComfyUI/custom_nodes. Then issue git clone https://github.com/ltdrdata/ComfyUI-Manager. Last thing to do, navigate to ComfyUI again and issue pip install -r requirements.txt. So I’m skipping some of the PyTorch stuff and that’s important and all, but this is just a real condensed summary that you’re going to have to fill the gaps of. Sorry. I might be too stoned to do a proper doc on it, but it’ll get you pointed in the right direction.

[]

Permanently Disable Nest Rush Hour Rewards Spam

This has been annoying me a shitload lately. I’ve been getting “Rush Hour Rewards” spam from my Nest thermostat, and I can find zero help anywhere officially from Google. It looks like it’s based on address, though, so Google “officially” recommends you simply ask to be “de-listed” from your local energy provider’s spam. This, to me, is a ridiculous solution that requires an equally ridiculous rebuttal.

So here’s what we’re going to do:

[]

Reclaim Your F-Keys in Byobu

I started using Byobu with tmux for sessions on my various machines, and overall I have to say I’m really impressed. It’s an awesome addition to the arsenal, but if you’re not super familiar with some of tmux’s finer points, byobu can really fuck with your head.

I noticed that disabling the “F-Keys” in byobu gives you access to F1-F11, but F12 is still fucked. That’s because it’s added as a second prefix. On the fly you can fix it with:

[]

Choppy MP4 Playback in Plex

I figured I’d drop this tip for anyone experiencing choppy playback with Plex and MP4 container files. I’ve experienced it, and I also came across a fix for it. It’s not the greatest fix, but it’s workable, and the result is good.

Apparently the problem is how Plex handles MP4 containers. The best solution is to simply move the video and audio data out of the MP4 container format and into Matroska. You don’t have to transcode anything, just switch container formats and it’ll play just fine. I prefer using mkvmerge for this. It’s a command line utility that runs on damn near anything. It’s a part of the mkvtoolnix library. You can download it here. The command is as simple as mkvmerge -o Output.mkv Input.mp4. The tool itself comes with a ton of features, but absolutely zero of them are necessary if you’re running Plex.

[]

“Obviously, Dumbass”

If you eerily stalk my blog in ways that definitely make me uncomfortable, you might’ve noticed a minor change in my totients post. In the last section of code starting on line 25, you might notice that line 27 is now highlighted yellow. That accentuation was always intended to be there. The problem was that I had done it incorrectly, because I didn’t understand the fucking directions.

I was using:

```lang {linenostart=25,hl_lines=27}
Blah blah blah
Blah Blah blah
```

What I didn’t realize was that hl_lines is independent of linenostart. What does that mean? That means if I want line 27 highlighted in the code, I don’t set hl_lines=27. I set, in this particular example, hl_lines=3.

[]

Totients

In the past, I’ve implemented Euler’s totient function for shits and giggles. It’s not a hard exercise by any means, but it can be if you haven’t had education in math at a level to understand the formula.

$$\varphi(n) =n \prod_{p\mid n} \left(1-\frac{1}{p}\right)$$

Admittedly, I had to google what the hell is going on. Technically, that’s just the framework, there are more details that follow in the form of rules. However, it was definitely a fun exercise to implement it. I think today I’m going to commit to downloading the latest version of rust and compiling that old code to see how much data I can generate. It’s really about all I can do to keep myself from going insane having to watch this robot perform the same tasks over and over until it gets them right. Yes, I have to intervene occasionally, but most of these debugs are very “hands off”.

[]

Unit Vectors and Angles

In my job, I work with a ton of unit vectors. While tracking things in three dimensions can be tricky, it helps to start breaking down as many aspects of the dimensions to their base components. I’m sure we’re all familiar with common spatial axis labeling. You get X, Y, and Z. Their application isn’t uniform. Some machine uses X for the vertical axis, some might use Z. What you might not yet be familiar with would be the orientations of objects in space. Yes, you can track the cartesian coordinates rather handily with XYZ, but that will only tell you the position of those objects. It won’t tell you the direction they’re facing, and for that we use unit vectors labeled IJK. They’re typically values between -1 and 1, and they can define rotation completely.

[]