• 1 Post
  • 20 Comments
Joined 11 months ago
cake
Cake day: September 5th, 2024

help-circle
  • I use something like this:

    #!/bin/bash
    
    set -euo pipefail
    URLS=(
        'https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/'
        'https://addons.mozilla.org/en-US/firefox/addon/privacy-badger17/'
        'https://addons.mozilla.org/en-US/firefox/addon/passff/'
        'https://addons.mozilla.org/en-US/firefox/addon/copy-plaintext/'
        'https://addons.mozilla.org/en-US/firefox/addon/duckduckgo-for-firefox/'
        'https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/'
        'https://addons.mozilla.org/en-US/firefox/addon/clearurls/'
        'https://addons.mozilla.org/en-US/firefox/addon/temporary-containers/'
        'https://addons.mozilla.org/en-US/firefox/addon/consent-o-matic/'
    )
    
    DOWNLOAD_BASE_URL='https://addons.mozilla.org/firefox/downloads/latest'
    _="${FIREFOX:=firefox}"
    _="${DST:=/usr/lib/$FIREFOX/browser/extensions}"
    
    if [ $UID -eq 0 ]; then
        SUDO=
    else
        SUDO=sudo
    fi
    
    
    download_links=()
    for url in "${URLS[@]}"; do
        package_name="$(sed 's_/$__' <<< "$url" | awk -F/ '{print $NF}')"
        download_links+=("$DOWNLOAD_BASE_URL/$package_name/addon-$package_name.xpi")
    done
    
    workdir="$(mktemp --directory)"
    cd "$workdir"
    for url in "${download_links[@]}"; do
        curl -OL "$url"
    done
    
    for ext in *.xpi; do
        ext_id="$(unzip -p "$ext" 'manifest.json' | jq -r '(if .browser_specific_settings then .browser_specific_settings else .applications end).gecko.id')"
        target="$DST/$ext_id.xpi"
        echo "$ext -> $target"
        $SUDO install -Dm644 "$ext" "$target"
    done
    

    That doesn’t handle the extension config though.


  • redxef@feddit.orgtoMemes@sopuli.xyzOff topic
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    8 days ago

    I’m sure that is a good price for the soundbar, but speaking for myself it’s too big, I don’t have the space for it, as I imagine many others do too. It isn’t too cheap either, imo.

    But that is really not the point. Not everyone is a giant movie geek, they just want to be able to understand what is being said.













  • Hmm. The first section about cloud service providers is a bit weird to me. There are providers which “keep my best interests in mind” as part of their business model, backblaze would be one. Their whole idea is to provide a good backup services. Encrypting my data before transit also doesn’t make me worried that it will be accessed by them or any of their employees because they will only get some garbled mess.

    Compare that to google, another cloud service provider. Their business model is to make money by selling me ads (foremost), they do that by gathering as much data as possible. Here all my answers would be negative.

    This puts me in an awkward spot where I nearly every time answer with “Neither agree nor disagree”, because there is more to it and not because I don’t have an opinion.








  • redxef@feddit.orgtoich_iel@feddit.orgIch🐮🐍🖥️iel
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    Lustiger Fakt: Python ist stark typisiert (aber dynamisch), aber booleans sind trotzdem integer:

    assert isinstance(True, int)
    

    War die einzige Falle in die ich bis jetzt rein gelaufen bin, die wirklich gemein ist.

    Und typehints im Zusammenhang mit cython. Und cython eigenheiten generell.