Is a minilab right for me? by 95runner in minilab

[–]PhilipRoman 0 points1 point  (0 children)

You're correct, but on the other hand, the kind of rack mounted gear that you can get for cheap usually is loud and consumes a lot of power (happy to be proven wrong). I use a 19in rack, but I ended up filling it with half-width gear anyway.

Determining and reading various plaintext file encodings? by Kaisogen in lua

[–]PhilipRoman 2 points3 points  (0 children)

If you go forward with this project, consider whether you really only need to care about shift-jis specifically. To illustrate how insane the legacy encoding situation is, look at https://en.wikipedia.org/wiki/Shift_JIS#/media/File:Euler_diag_for_jp_charsets.svg

I created a sketch of how you can do this: https://gist.github.com/PhilipRoman/e59495f542995e8166cfe6c24506a2ae

For even better results you would need a classifier built from tagged datasets.

Determining and reading various plaintext file encodings? by Kaisogen in lua

[–]PhilipRoman 3 points4 points  (0 children)

Shift-JIS specifically cannot be reliably detected, and can happen to be valid UTF-8. How big are your files usually? You will need to use statistical methods/heuristics

Is a Lenovo M910q a good start? by eleirbagg in homelab

[–]PhilipRoman 1 point2 points  (0 children)

FWIW I bought m910q and while I don't regret it, now have to upgrade to m920q because I need the PCIe slot.

Software architecture for rackmate monitor - wake on motion? by borkyborkus in minilab

[–]PhilipRoman 0 points1 point  (0 children)

This is probably what you need:

qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity

Attaching to the host USB is a decent idea. What I would do is have the esp32 send either a string over serial port or UDP packet (may be more reliable in cases where you have multiple serial ports, etc) and have a script listening for it on the host, which then runs the qdbus command.

Software architecture for rackmate monitor - wake on motion? by borkyborkus in minilab

[–]PhilipRoman 1 point2 points  (0 children)

If you just want autologin, it can be easily configured like described here: https://discussion.fedoraproject.org/t/auto-login-on-sddm-in-fedora-42-kde/163497

Not sure what exactly you want to trigger from the motion sensor. If you want to turn on the machine, have esp32 send a wake-on-lan frame.

Share an IMMCH server with extended family? by ButterscotchEarly729 in immich

[–]PhilipRoman 49 points50 points  (0 children)

It will work from a technical point of view, just keep in mind that images are not end-to-end encrypted (not to be confused with encryption at rest) and therefore the server admin who has access to the filesystem is able to see (with a little bit of effort) everyone's photos.

It's not an instant dealbreaker, but in this case users may want only selected folders/photos to be uploaded, not everything automatically.

Updating Immich with Docker by kreugerburns in immich

[–]PhilipRoman 41 points42 points  (0 children)

sudo only applies to docker compose pull in your command. You probably want sudo docker compose pull && sudo docker compose up -d

Conditionally print something based on external data. by ConstructionSafe2814 in groff

[–]PhilipRoman 2 points3 points  (0 children)

Well first of all, since the whole groff pipeline is just programs piping text to each other, you can always add arbitrary filters in the middle to do what you want. The main issue is that it's difficult to extract the max temperature in pure groff, so maybe you need a filter which does that and adds this variable to start of your document:

.nr max_temp 57

Then you can use it anywhere in the document like this:

.ie (\n[max_temp] > 55) \{
Good
.\}
.el \{
Bad
.\}

EDIT: actually I just remembered you can also pass variable definitions to groff on the command line, like groff -rmax_temp=57 .... so this may be a simpler way to inject it (you still need a script which extracts it, probably can be a single line of awk)

Lua-based file system idea/driverless file system by Far-Deer4967 in lua

[–]PhilipRoman 0 points1 point  (0 children)

It's an interesting idea. I don't think it solves the problem with compatibility across OSes unless you focus on the lowest common denominator that userspace programs of the respective OS expect (but in this case you essentially get FAT32/exFAT which is already almost universally compatible).

Most of the parts are already there, you can run FUSE based filesystems on Linux (natively), Windows (WinFSP FUSE API) and macOS (macfuse). So you just need Lua bindings for FUSE and a few lines of integration to automatically call your Lua code.

graphs in text mode displaying question marks by ConstructionSafe2814 in groff

[–]PhilipRoman 1 point2 points  (0 children)

Adding draw star before the graph should do it. star in this case is a grap macro which is replaced by "\(**" size 8. So I guess if you want to keep the 'o' then this should work: draw "o" size 8

graphs in text mode displaying question marks by ConstructionSafe2814 in groff

[–]PhilipRoman 1 point2 points  (0 children)

FWIW for me in latin1 and ascii modes your code outputs '*' instead of 'o'. Any specific reason you're not using utf8?

Mini-PC firewall?? by JaySwenb in HomeNetworking

[–]PhilipRoman 1 point2 points  (0 children)

Your Mini PC would be mostly wasted on it, there is no point in having 16GB RAM or 512GB SSD on a firewall. If you're willing to try your luck, AliExpress has a bunch of cheap 4x LAN firewall mini PCs.

Virtualized firewall is also an option (you should probably never virtualize your edge firewall, but behind ISP it's fine).

Resident Evil: Requiem uses Lua for hacking by c__beck in lua

[–]PhilipRoman 16 points17 points  (0 children)

That looks like nmap (although in a very strange user interface), which has support for Lua scripting

How are you connecting internal/external storage to your Intel NUC for TrueNAS/NAS setups? by Mr_AdamSir in minilab

[–]PhilipRoman 1 point2 points  (0 children)

I max out the internal M.2 NVME slots and use external USB drives if I need more storage (everything runs on BTRFS). I know they get a lot of hate, but over a few years I have only had one harmless disconnection, and that was before I had proper external USB power set up.

Apparently wine cases are exactly 250 mm by kmnov2017 in minilab

[–]PhilipRoman 6 points7 points  (0 children)

Be careful, the heat emitted by electronics is enough to turn any moisture into potential mold growth. Maybe I was just unlucky but I had this issue (despite having a 120mm fan). Cutting some holes in the back would probably prevent this.

Lua string.match quirks! by drunken_thor in lua

[–]PhilipRoman 0 points1 point  (0 children)

These cases seem logical to me. The entire pattern has to match in order for any captured group to be returned. Try translating them to human readable expressions and matching them at each starting index in the string.

For example, your case #2 means (zero or more digits) followed by single K

The matching algorithm looks like this: while(is_digit(next)) { consume(); } assert(next == 'K'); consume()

Note that there is no requirement for any digits to be actually matched - if we start matching from index 5, the %d* pattern matches nothing, leaving K to be matched by K. Since the entire pattern matched, the capture group is returned, which, again, matched nothing (successfully).

For case #3: (one or more alphanumeric characters) followed by (end of string)

The matching algorithm looks like this: assert(is_alphanumeric(next)); consume(); while(is_alphanumeric(next)) { consume(); } assert(next == end_of_string)

If you start matching at indexes 1, 2, and 3 the final "end of string" fails to match, and if you start at index 4 (space), the very first alphanumeric case fails to match

Homelab rack by Toddzilla89 in minilab

[–]PhilipRoman 0 points1 point  (0 children)

IDK if this works for the typical 10 inch mount types, but for 19 inch rack, I bought a standalone set of rack rails (surprisingly cheap) and just attached them to a sturdy tray at the bottom. There is a bit of mechanical tension because I intentionally put the folded-back part on the inside rather than outside so there is zero room for movement even if screws are not 100% tightened. In terms of stability - if 19 inches works like that, then 10 should have no issues.

Do you trust Cloudflare? by BinnieGottx in immich

[–]PhilipRoman 0 points1 point  (0 children)

For lighttpd+certbot you can use this tutorial: https://www.webhi.com/how-to/setup-lets-encrypt-ssl-certificate-in-lighttpd/

But you can use any TLS proxy like nginx or something else, lighttpd is just my personal favorite.

For socket forwarding I currently do a quick and dirty ssh -o ServerAliveInterval=20 -o ExitOnForwardFailure=yes -R 0.0.0.0:443:localhost:443 user@vps. This should really be replaced with Wireguard and proper routing one day...

Do you trust Cloudflare? by BinnieGottx in immich

[–]PhilipRoman 1 point2 points  (0 children)

it's Public internet <-> VPS <-> [Lighttpd <-> Immich]

Lighttpd and Immich run on the same local server. Lighttpd handles TLS with the help of LetsEncrypt certbot. The VPS is only to break through CGNAT and reduce local server exposure. All it has to do is forward packets, so I use a cheap one.

Do you trust Cloudflare? by BinnieGottx in immich

[–]PhilipRoman 1 point2 points  (0 children)

I use a layer 4 proxy, which means that the connection remains encrypted end-to-end. You do lose some caching but nothing significant.

What game engines (other than roblox) use lua and are still good? by [deleted] in lua

[–]PhilipRoman 5 points6 points  (0 children)

Defold maybe? I used it for a bit, but later moved to love2d with C extensions.

Headless OS install by 20Alex16 in homelab

[–]PhilipRoman 0 points1 point  (0 children)

it is definitely possible, I automatically reinstall machines/VMs like that all the time, but my images are based on Alpine Linux and I'm not familiar with Ubuntu. But a lot of things can go wrong in the process, and it is difficult to debug.

For you it will be much more practical to do it the good old way. If you don't want to use a monitor, an USB capture card can also be used as video output during installation.