• 21 Posts
  • 106 Comments
Joined 1 年前
cake
Cake day: 2023年6月21日

help-circle


  • When it comes to writing code, there is a huge difference between code that works and code that works *well." Lets say you’re tasked with writing a function that takes an array of RGB values and converts them to grayscale. ChatGPT is probably going to give you two nested loops that iterate over the X and Y values, applying a grayscale transformation to each pixel. This will get the job done, but it’s slow, inefficient, and generally not well-suited for production code. An experienced programmer is going to take into account possible edge cases (what if a color is out of the 0-255 bounds), apply SIMD functions and parallel algorithms, factor in memory management (do we need a new array or can we write back to the input array), etc.

    ChatGPT is great for experienced programmers to get new ideas; I use it as a modern version of “rubber ducky” debugging. The problem is that corporations think that LLMs can replace experienced programmers, and that’s just not true. Sure, ChatGPT can produce code that “works,” but it will fail at edge cases and will generally be inefficient and slow.


  • There are really two reasons ECC is a “must-have” for me.

    • I’ve had some variant of a “homelab” for probably 15 years, maybe more. For a long time, I was plagued with crashes, random errors, etc. Once I stopped using consumer-grade parts and switched over to actual server hardware, these problems went away completely. I can actually use my homelab as the core of my home network instead of just something fun to play with. Some of this improvement is probably due to better power supplies, storage, server CPUs, etc, but ECC memory could very well play a part. This is just anecdotal, though.
    • ECC memory has saved me before. One of the memory modules in my NAS went bad; ECC detected the error, corrected it, and TrueNAS sent me an alert. Since most of the RAM in my NAS is used for a ZFS cache, this likely would have caused data loss had I been using non-error-corrected memory. Because I had ECC, I was able to shut down the server, pull the bad module, and start it back up with maybe 10 minutes of downtime as the worst result of the failed module.

    I don’t care about ECC in my desktop PCs, but for anything “mission-critical,” which is basically everything in my server rack, I don’t feel safe without it. Pfsense is probably the most critical service, so whatever machine is running it had better have ECC.

    I switched from bare-metal to a VM for largely the same reason you did. I was running Pfsense on an old-ish Supermicro server, and it was pushing my UPS too close to its power limit. It’s crazy to me that yours only pulled 40 watts, though; I think I saved about 150-175W by switching it to a VM. My entire rack contains a NAS, a Proxmox server, a few switches, and a couple of other miscellaneous things. Total power draw is about 600-650W, and jumps over 700W under a heavy load (file transfers, video encoding, etc). I still don’t like the idea of having Pfsense on a VM, though; I’d really like to be able to make changes to my Proxmox server without dropping connectivity to the entire property. My UPS tops out at 800W, though, so if I do switch back to bare-metal, I only have realistically 50-75W to spare.


  • Social media companies, adult websites, whatever, can try to find ways to block children from accessing their content, but kids will always find a way around it.

    It’s the parents’ responsibility to control their children. I’ve said 1000 times, children don’t need access to smartphones and tablets. A desktop PC or laptop with strict parental controls is adequate enough for school work, learning about technology, and some basic entertainment.

    When a child is old enough to work and pay for a smartphone themselves, then they’re old enough to have a smartphone. A prepaid flip phone with basic voice and SMS is more than enough for a 15-year-old.


  • corroded@lemmy.worldtoSelfhosted@lemmy.worldLow Cost Mini PCs
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    17 天前

    I have a few services running on Proxmox that I’d like to switch over to bare metal. Pfsense for one. No need for an entire 1U server, but running on a dedicated machine would be great.

    Every mini PC I find is always lacking in some regard. ECC memory is non-negotiable, as is an SFP+ port or the ability to add a low-profile PCIe NIC, and I’m done buying off-brand Chinese crop on Amazon.

    If someone with a good reputation makes a reasonably-priced mini PC with ECC memory and at least some way to accept a 10Gb DAC, I’ll probably buy two.




  • Like several people here, I’ve also been interested in setting up an SSO solution for my home network, but I’m struggling to understand how it would actually work.

    Lets say I set up an LDAP server. I log into my PC, and now my PC “knows” my identity from the LDAP server. Then I navigate to the web UI for one of my network switches. How does SSO work in this case? The way I see it, there are two possible solutions.

    • The switch has some built-in authentication mechanism that can authenticate with the LDAP server or something like Keycloak. I don’t see how this would work as it relies upon every single device on the network supporting a particular authentication mechanism.
    • I log into and authenticate with an HTTP forwarding server that then supplies the username/password to the switch. This seems clunky but could be reasonably secure as long as the username/password is sufficiently complex.

    I generally understand how SSO works within a curated ecosystem like a Windows-based corporate network that uses primarily Microsoft software for everything. I have various Linux systems, Windows, a bunch of random software that needs authentication, and probably 10 different brands of networking equipment. What’s the solution here?



  • If you’re concerned about power, I don’t see any reason it should matter at all where you have your cameras, as long as your PoE switch is rated to supply your cameras. If your NVR has some kind of built-in PoE switch, then you can probably avoid having a second PoE switch for your cameras by co-locating them in the same network closet, but PoE switches are so cheap, I’d say set it up however it’s most convenient for you. To answer your question of “is it possible,” it absolutely is. I’m doing something similar. I have a lot of cameras, but two of them are PoE and are quite a distance away from my NVR server. They feed into a PoE switch that connects to a second switch that acts as the main switch for the building. That switch has a fiber connection to a third switch that lives in my server rack, and that switch has a DAC connection to my DVR server. They work just as well as the ones plugged directly into my rack switch.

    The only real concern I see is bandwidth. If your cameras and NVR are on the same switch, you’d avoid having to pass the data from the cameras out across your network to the switch that has your NVR. For 4 cameras, though (even at 4k), your total bandwidth is going to be far less than what even a 1GB network can handle. It’s very easy to saturate a switch, though, so this is going to depend largely on your network topology and what you’re using your network for.

    I would highly encourage you to keep your IP cameras on a separate VLAN, though. IP cameras all have a tendency to want to “call home,” and while that might just be for something as simple as checking for firmware updates, I don’t want my cameras connecting to anything outside my network without my permission.




  • I’m fortunate enough to be a homeowner, but I rented places for most of my adult live. My current home doesn’t have central AC, and none of my rentals did either.

    Everywhere I’ve lived, the mounting hardware that comes with portable ACs just didn’t work for me. What I found that did work is to throw away the existing window mount and build your own. I’ll take two pieces of plywood, cut them to the space that exists in my window (at one point this was a sliding door), and sandwich a sheet of insulation foam in the middle. Then drill holes for your AC tubes and screw on the mounts that came with your AC.

    Also, if at all possible, avoid the single-hose portable units. You’re wasting cold air. A dual-hose unit uses outdoor air to cool the unit itself, and the hot exhaust gets expelled through the second tube. Do make sure you have a screen on the inlet, though, unless you want to be cleaning out bugs from inside your AC. I have used window units, single-hose portable, and dual-hose portable units. At least in my experience, the window units work best, the dual-hose units are a close second, and the single-hose units are crap.

    As far as HA integration, I recently went through the process of finding a new AC that works with HA. What I found is that everything available either requires internet access and works with proprietary “cloud” access or just doesn’t have any sort of remote connection. Some of the “cloud” solutions have decent integration with HA, but I have a hard-and-fast rule that none of my IoT devices access anything outside my home network. What worked for me is buying a “dumb” portable AC with a remote control and using a Wifi-connected universal remote to provide access to HA.


  • I’ve been an electronics hobbyist for years, and I still don’t own a 3D printer. You can buy premade enclosures in almost every size you can imagine. Then just drill holes to mount IO ports.

    I do want to get a 3D printer exactly for this reason, but I’ve just never gotten around to buying one. They are certainly not a necessity if you want to build your own stuff.


  • One of my favorite automations is my “temperature lamp.” HA takes an average temperature, humidity, and illuminance from various outdoor sensors around my property. I have a template sensor that uses these values, then gives me a “feels-like” outdoor temperature. Another template sensor takes this “feels-like” temperature and converts it to a percentage between 0 (freezing) an 100 (> 120 degrees F). It uses this percentage to calculate a value between blue and red on a perceptually-uniform colorspace (CIELAB) and spits out an RGB value. An automation watches this RGB value and applies it to a RGB light bulb in my living room.

    The result is that I have a light that displays what the temperature “feels like” and changes color in a way that people perceive as matching the temperature. So if the lamp looks “kind of blue” it’s going to feel “kind of cold” outside. If the bulb looks “kind of red,” it’s going to feel “kind of warm.”

    I set this up for fun, but it’s actually ended up being really useful. Before we leave the house, we can just glance over at the lamp and know if we need to put on a sweatshirt or a coat, or maybe leave the outerwear at home.


  • I’m old. Not old enough to need a prostate exam, but old enough to potentially have children in his target demographic. That being said, he essentially has found a winning formula for videos that amounts to “give away lots of money and make it entertaining.” I’ve watched a lot of his videos; they are entertaining and a decent way to kill 10 minutes.

    I’m assuming you asked this question because of all the recent information that came to light calling him a fraud, and to be honest, it’s kind of a big deal. Part of his brand has always been “these are random people, competing or doing a challenge to win a life-changing wad of cash.” He’s made a point on multiple occasions to say that his videos are never faked. It’s not too dissimilar to any cable TV game show. The fact that these aren’t random people and are employees or actors, and that the outcomes are fixed, makes the audience feel deceived.

    It’s the difference between why people watch pro wrestling vs MMA or boxing. With pro wrestling, we all know it’s a show; it’s a scripted performance, just like a movie or a play. People still watch it and enjoy it, but they know it’s no different than watching a fictional TV show or going to the theater. In MMA or boxing, you’re watching two people compete to see who’s the better fighter. It doesn’t have a predetermined outcome; you’re watching a real competition.

    The problem is that he has always presented himself as being “boxing” when in reality, he’s “pro wrestling.” The people featured in his videos aren’t random subscribers trying to win money to send their kids to college or put a down payment on a house. They’re employees or paid actors who are putting on a show for our entertainment. There’s nothing wrong with mindless entertainment, but call it what it is.

    TLDR: Fake videos, unsubscribed.



  • I don’t want to buy 2 or 3 burgers to feed homeless people. I mentioned this in another comment, but the group of people who are homeless and the group of people who are addicted to meth, heroin, whatever are largely the same group, maybe with a few outliers. Why the hell would I want to buy lunch for someone who’s going to go out and rob or harass someone for $20 so they can go buy a bag of their drug of choice?

    People like myself (and others in this comment section) don’t hate the homeless. We hate drug addicts who shit all over society (sometimes literally) in order to get their next fix.

    Here’s an experiment you can try: The next time you see a homeless person begging for money so they can buy some food, refuse to give them money and offer to buy them food instead. They’re probably going to call you a piece of shit and if you’re lucky, they might leave you alone after that, but probably not.

    People need to have sympathy for the homeless, but not for addicts. We should have social programs to house the homeless, as long as they can pass a drug test. Food banks, work-placement programs, they should all exist and be taxpayer funded, as long as those using them can pass a drug test.



  • I really wish there was a viable alternative for physical backups. Blu-ray just doesn’t have enough storage space, tape is expensive, and hard drives need to be periodically read.

    I’ve read about holographic WORM media, but I just don’t think there’s enough consumer demand for the hardware and media to ever be as affordable as blu-ray.

    Once upon a time, I could back up all my important data to a stack of DVD-Rs. How am I supposed to back up a 100TB NAS, though? The “best” alternative is to build a second NAS for backup, but that’s approaching tape drive levels of cost.