Canadian software engineer living in Europe.

  • 2 Posts
  • 18 Comments
Joined 2 years ago
cake
Cake day: June 7th, 2023

help-circle

  • I have a few interesting ones.

    Download a video:

    alias yt="yt-dlp -o '%(title)s-%(id)s.%(ext)s' "
    

    Execute the previous command as root:

    alias please='sudo $(fc -n -l -1)'
    

    Delete all the Docker things. I do this surprisingly often:

    alias docker-nuke="docker system prune --all --volumes --force"
    

    This is a handy one for detecting a hard link

    function is-hardlink {
      count=$(stat -c %h -- "${1}")
      if [ "${count}" -gt 1 ]; then
        echo "Yes.  There are ${count} links to this file."
      else
        echo "Nope.  This file is unique."
      fi
    }
    

    I run this one pretty much every day. Regardless of the distro I’m using, it Updates All The Things:

    function up {
      if [[ $(command -v yay) ]]; then
        yay -Syu --noconfirm
        yay -Yc --noconfirm
      elif [[ $(command -v apt) ]]; then
        sudo apt update
        sudo apt upgrade -y
        sudo apt autoremove -y
      fi
      flatpak update --assumeyes
      flatpak remove --unused --assumeyes
    }
    

    I maintain an aliases file in GitLab with all the stuff I have in my environment if anyone is curious.


    • Pros: Cheaper to install as you don’t have to rip up the whole road, capable of cornering at around 15kph. Low initial cost.
    • Cons: Battery powered, with a 70km range, with a max capacity of 60 people. Driven by humans.

    This does not sound like something anyone needs and it appears to be designed to share the road with private vehicles (hence the focus on speed and cornering) which means it will get stuck in traffic.

    When you’re paying humans to drive something, the benefit comes not in how fast it corners but in how many people can be transported at once. Even if it’s a straight line at 20kph, it’s still better to have big LRTs hauling upwards of 2000 people, stopping at intersections to let them switch to another LRT going in another direction.

    The one benefit I can see here is the low cost of installing these tracks, it could be used to trial a route served by a tram (negating the cornering feature), but even then, a bus has near zero infrastructure requirements and can move more people than this for the same price.


  • I have much the same:

    • Files on the network with NFS
    • Kodi on an old laptop under the TV so we can watch said files.
    • Syncthing on our phones and laptops to pull films from there onto that file server.

    The only difference is that I’m using a Synology 'cause I have 15TB and don’t know how to do RAID myself, let alone how to do it with an old laptop. I can’t really recommend a Synology though. It’s got too many useless add-ons and simple tools like rsync never work properly with it.









  • Daniel Quinn@lemmy.catoFuck Cars@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    24
    arrow-down
    1
    ·
    1 month ago

    Woah woah there friend. We’re on the same side here. I cycle my kid to school and then onto work nearly every day and I’m regularly on the receiving end of some seriously scary and dangerous assholes behind the wheel. They feel entitled to the whole damned road, and I’m sure they fantasise about running us over. I’ve been tailgated, screamed at, nearly clipped multiple times by people “just wanting to catch the light” or some nonsense. They are dangerous assholes and should be banned from the city.

    I’m just saying that if you’re going to pretend that everyone behind the wheel of a car is fully aware that they’re pushing two tonnes of steel and glass around at high speeds, then you’re not working with facts. Cars are literally designed to stoke the illusion of comfort and immobility, that you’re just “on the road” without a Giant Metal Cage around you. You take a human and put them in that situation they will inevitably drive like fucking psychopaths. That doesn’t mean that he shouldn’t go to prison forever, but it’s important to understand where this coming from.

    The problem is the normalisation of a dangerous pattern.


  • Daniel Quinn@lemmy.catoFuck Cars@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    3
    ·
    1 month ago

    Politicians here have been stoking this anger for years now. Drivers feel entitled to do shit like this all the time (I speak from many personal experiences). He probably didn’t mean to kill the guy, but likely felt totally justified in jumping the curb and “trying to scare him”. They forget they’re driving fucking tanks around and justify their aggression with platitudes like “well I’m bigger, he should get out of the way”.



  • Granted, sudo isn’t in coreutils, but it’s sufficiently standard that I’d argue that the licence is very relevant to the wider Linux community.

    Anyway, I answered this at length the last time this subject came up here, but the TL;DR is that private companies (like Canonical, who owns Ubuntu) love the MIT license because it allows them to take the code and make proprietary versions of it without having to release the source code. Consider the implications of a sudo binary that’s Built For Ubuntu™ with closed-source proprietary hooks into Canonical’s cloud auth provider. It’s death by a thousand MIT-licensed cuts to our once Free operating system.