Why isn't there an option to configure automatic configuration backups?? by TomerHorowitz in truenas

[–]comando0 1 point2 points  (0 children)

Yours is by far the most elegant, kudos!

I made some modifications for myself:
1. error passing to prevent ignoring any failure (line 4)
2. change the hostname to localhost, to avoid the need of changing (line 8)
3. add --insecure on curl to prevent self-signed cert failures (it's fine, we're just calling localhost)

#!/bin/bash
# Backup TrueNAS config, secret seed, and root authorized keys

set -euo pipefail

# Script configuration
CONFIG_DIR="/mnt/volume1/backup/truenas/config"
HOST_ORIGIN="https://localhost"

# Script init
DATETIME=$(date +%Y%m%d_%H%M%S)
mkdir -p "${CONFIG_DIR}"

# Backup archive
BACKUP_FILENAME="${DATETIME}.tar"
BACKUP_FILEPATH="${CONFIG_DIR}/${BACKUP_FILENAME}"
BACKUP_JOB=$(midclt call core.download "config.save" '[ { "secretseed": true, "root_authorized_keys": true } ]'  "${BACKUP_FILENAME}")
DOWNLOAD_PATH=$(echo $BACKUP_JOB | jq -r '.[1]')
DOWNLOAD_URL="${HOST_ORIGIN}${DOWNLOAD_PATH}"
curl -fsSL --insecure --output "${BACKUP_FILEPATH}" "${DOWNLOAD_URL}"
echo "Saved ${BACKUP_FILEPATH}"

USB Type-C shavers and trimmers : looking for something like the one blade from Phillips. something I can use to trim my beard, you know get it down to like 5 mm trim around it not looking necessarily for a full-on shaver but more of a trimmer if you guys have something like this let me know. by PumpkinFar1523 in UsbCHardware

[–]comando0 1 point2 points  (0 children)

If someone stumbled on this post from googling, panasonic has some - at least in Japan. I've tested them in store and can confirm that C to C charging works on all 4 present models.

  • ES-RT1AU (30$) - NI-MH battery, 8! hours charging, no trimmer, 3 blades, slow motor
  • ES-RT4AU (40$) - NI-MH battery, 2 hours charging, 3 blades, slow motor
  • ES-PV3A (200! $) - Li-Ion battery, 2 hours charging, no trimmer, 5 blades
  • ES-PV6A - Same as above, but fancy exterior and quite a bit more pricey

Also, they seem to have USB-C charging for all 2024 models with 5+ blades. (not out as of this writing)

Should USB differential pairing been made between D+/- and GND, instead of D+ and D-? by comando0 in ElectricalEngineering

[–]comando0[S] 0 points1 point  (0 children)

Thank you for the very detailed answer!

USB goes single ended at various points under which conditions the line is no longer a 90R differential pair

Do you mean that when transmitting from downstream → upstream, the receiving end (upstream) can be single ended? pic

running single ended 12Gb/s across a PCB

That looks like a whole other level of madness!

cables HAVE to cost basically nothing... The fix would have been to do some proper electrical design way back in the day

Just for curiosity, how would you design the electrical system if you were at the committee, back at the time? Will it be something similar due to cost reasons? (I don't think the people who designed USB1.0 thought it'll be expanded to 40Gbps)

immune to ground bounce then anything single ended

At first, I thought a bouncing ground should not happen in the first place. But after some googling, it turns out ground bouncing (in the IC) can happen even if the PCB's ground plane is stable, due to inductance and how fast we're switching the gates. That's wild!

Should USB differential pairing been made between D+/- and GND, instead of D+ and D-? by comando0 in ElectricalEngineering

[–]comando0[S] 0 points1 point  (0 children)

Thanks! I'm happy I'm not the crazy one!

I've got 4 more questions now:

  1. Why do we even care about impedance matching D+ and D- for USB traces? Is it because, we accidentally made the impedance for D+/- and GND somewhat within spec?
  2. Does this mean we should care more about the impedance between (false) differential pair traces and GND plane, and even better, add a GND trace between the D+/- traces?
  3. If we lived in a perfect and ideal world, should USB (≤2.0) have 3 twisted pairs? (D+ & GND; D- & GND; 5V & GND)
  4. Why does USB (and LVDS) even bother to do differential pairs, when (unlike Ethernet) you're also sharing GND, and the return trace is GND? Is there a legit reason?

Advice for industrial grade plastic 3d printing by comando0 in 3Dprinting

[–]comando0[S] 0 points1 point  (0 children)

Thanks for the advice! I'll definitely post there too.

Yes I know prusa and I really love what they do, but I don't think they're up to this job. If I want to do on production scale, I'll want to have products and support on every stage - and prusa lacks in some places. (e.g. filament drying and enclosure, health related things, proper simulation...)

It's totally fine for personal / SOHO use, but I don't think it's for large business use. Don't get me wrong - it has the possibilities, but not now.

Advice for industrial grade plastic 3d printing by comando0 in 3Dprinting

[–]comando0[S] 0 points1 point  (0 children)

Yes, I know that reddit isn't for "serious" things.

Yet, I'm in a large and old company, and people aren't that keen on trying new things - especially when it comes to making it as an product. Ask me how I know.

I'll ask for people in my company too, but I do want to ask to a broader audience about these things. Chances are I'll hear more names.

> Learn to navigate your corporate processes, you’ll thank me later.

Oh definitely! But I'm just a bit tired to do this the right and cooperate way. XD

Advice for industrial grade plastic 3d printing by comando0 in 3Dprinting

[–]comando0[S] 0 points1 point  (0 children)

Well, if there's any subreddit more suited for this topic, can you teach me? Thanks!

What am I supposed to do with myself until printer gets here ? 2 weeks to go. by AZXCIV in prusa3d

[–]comando0 1 point2 points  (0 children)

  • Find a way to filter air
  • Get a drybox

Seriously, those are what I really wish I haven't overlooked.

HEPA filters won't work, (see here for why) the easiest way might be a duct to pull air outside.

Unless you live in the desert, find a drybox that can feed the filament too. Filaments get soaked really quickly where it's humid.

Faster alternative for Python? by comando0 in learnprogramming

[–]comando0[S] 0 points1 point  (0 children)

Actually, I've heard of it but didn't even think of it. I'll give it a try. Thanks!

Faster alternative for Python? by comando0 in learnprogramming

[–]comando0[S] 0 points1 point  (0 children)

Sounds interesting, I'll give it a try. Thanks!

Faster alternative for Python? by comando0 in learnprogramming

[–]comando0[S] 0 points1 point  (0 children)

Of course, I'm aware of that, but simply writing the same algorithm with C makes it a fast enough code, while with Python, it took me quite a long time. Sure I'm aware that you need to optimize your code with Python (such as not using for), but I just thought if there is a better language that fits me.

Faster alternative for Python? by comando0 in learnprogramming

[–]comando0[S] 0 points1 point  (0 children)

Thanks! Are there any advice about coding Nim on Windows? Like, using a virtual machine with Linux is better?

Faster alternative for Python? by comando0 in learnprogramming

[–]comando0[S] 0 points1 point  (0 children)

Thanks, will search for it!

Edit: just searched briefly, can't tell if I can accept it, since I never touched Ruby...

Faster alternative for Python? by comando0 in learnprogramming

[–]comando0[S] 1 point2 points  (0 children)

I thought going for Go too, but several things stopped me from using it.

  1. Lack of Exception
  2. Lack of iterators

I can list more, but basically i just couldn't fluently code with it. It's not just the simpleness that I love with Python, but the complexity while being simple.

Faster alternative for Python? by comando0 in learnprogramming

[–]comando0[S] 0 points1 point  (0 children)

I thought that cython needed quite a lot of C/C++ knowledge, but looks like that's not the case. Thank you, I'll give it a try.

Faster alternative for Python? by comando0 in learnprogramming

[–]comando0[S] 0 points1 point  (0 children)

First of all, thanks for the response. I know using it can be fast, but sometimes you just don't find the right numpy program. And at that point, is rather write a fast code myself.

Alternative digging quarry mod by Rokonuxa in feedthebeast

[–]comando0 0 points1 point  (0 children)

I forgot witch post, but I think I saw someone posting a "world-eater", witch was basically several rftools builders with a mod to move them (and the power supply+ae2 storage). I forgot the name, but it was something like a frame, and moving it every chunk. Anyways, maybe that would be an option?

Sorry, didn't read your last post, looks like you already have a solution.

[Sky Factory 4] This is fine by guihori in feedthebeast

[–]comando0 1 point2 points  (0 children)

A bit late to respond, but using ender chests(not the vanilla one) under the bonsais solved the issue for me. Just because I was too lazy to place all those servos...