• 0 Posts
  • 12 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle


  • Yup and I am getting sick of hearing this even on Arch Linux. Like, mofo, you could literally run a snapshot or backup before upgrading, don’t blame us if you’re yoloing your god damn computer. Windows have exactly the same problem too and this is why we have backups. Christ.

    On my Arch Linux Install, I literally have a Pacman Hook that would forcibly run backup and verify the said backup before doing a system-wide update.






  • Yep, and if open source licensing could be revoked on a whim, you can imagine the chaos that ensued. That would be my understanding as well, old version that have MPL license is perfectly fine to fork off, newer version might not be as it is under a different license. One of the reason why I liked Apache License is that it have make it explicitly clear that it’s irrevocable whereas MPL it is operating on an assumption that it’s not revocable. The most fundamental problem with the legal system in USA is that no law is “set in stone” and leaving things to assumption is open to reinterpretation by the judge who may have sided against you. (Hell, Google vs Oracle on Copyrighted API is still on case-to-case basis, so take it as you will.)

    Disclaimer: I am not a lawyer. I just share what I learned from Legal Eagle youtube and few other sources.



  • Probably this script:

    #!/bin/bash
    
    if [ -z "$1" ]
    then
            echo "Please provide git repository url as an argument for this script."
            exit 1
    fi
    regex='(https?|ftp|file)://[-[:alnum:]\+&@#/%?=~_|!:,.;]*[-[:alnum:]\+&@#/%=~_|]'
    if [[ $1 =~ $regex ]]
    then
    basename=$(basename $1)
    reponame=${basename%.*}
    curl -X 'POST' 'https://localgitea.com/api/v1/repos/migrate?access_token={Access Token Here}' \
      --insecure \
      -H "accept: application/json" \
      -H "Content-Type: application/json" \
      -d '{  "clone_addr": "'"$1"'",  "issues": false,  "labels": false,  "lfs": false,  "mirror": true,  "mirror_interval": "96h0m0s",  "private": false, "repo_name": "'"$reponame"'", "pull_requests": true,  "releases": true, "repo_owner": "githubpublic",  "service": "git",  "wiki": true}'
    else
            echo "Invalid URL"
            exit 1
    fi
    

    You can adjust it as needed and as for why I have --insecure flag, I have a direct network cable between my PC to the server, so encryption or HTTPS is not needed here. This is probably my favorite command, because I would write above as .sra.sh in home directory and then alias the .bashrc to make a sra command by adding alias sra=/home/{your user account}/.sra.sh in .bashrc and from there, anytime I have an interesting repository that I want to archive, I simply run sra {git url} and that’s it. It also specify the mirror interval manually for 4 days interval rather than every 8 hours that would’ve needlessly spam the git server.

    This is something I rely on everyday both as developer and system admin, I would maintain a different supply chain and prevent a supply chain attacks by generating my own package feeds/registry automatically from Gitea/Forgejo.

    Edited to Add: I noticed this community is Powershell, here the powershell version of above:

    param (
        [Parameter(Mandatory=$true)]
        [string]$gitRepoUrl
    )
    
    function Test-Url($url) {
        $regex = "(https?|ftp|file)://[-[:alnum:]\+&@#/%?=~_|!:,.;]*[-[:alnum:]\+&@#/%=~_|]"
        return $url -match $regex
    }
    
    
    $basename = Split-Path $gitRepoUrl -Leaf
    $reponame = [System.IO.Path]::GetFileNameWithoutExtension($basename)
    
    $headers = @{
        'accept' = 'application/json'
        'Content-Type' = 'application/json'
    }
    
    $body = @{
        'clone_addr' = $gitRepoUrl
        'issues' = $false
        'labels' = $false
        'lfs' = $false
        'mirror' = $true
        'mirror_interval' = '96h0m0s'
        'private' = $false
        'repo_name' = $reponame
        'pull_requests' = $true
        'releases' = $true
        'repo_owner' = 'githubpublic'
        'service' = 'git'
        'wiki' = $true
    } | ConvertTo-Json
    
    Invoke-RestMethod -Uri 'https://localgitea.com/api/v1/repos/migrate?access_token={Access Token Here}' -Method POST -Headers $headers -Body $body -SkipCertificateCheck
    
    

  • To muhanga, I appreciate you sharing your perspective, but I have to respectfully disagree with your claim that “In short blockchain and crypto don’t solve any real world problem” In my view, blockchain technology offers at least one useful innovation by providing an alternative system for digital transactions over the web. The value of cryptocurrencies themselves may be unstable or abstract, but the blockchain ledger allows people to exchange them securely without centralized oversight and restrictions.

    When you purchase a coin on cryptocurrency, it have no inherent value, it’s value is determined by the price of what sellers and buyers are willing to buy/sell it at, that what actually give a coin it’s value.

    The problem with the idea of peer to peer modern fiats that you brought up is that it doesn’t have any mechanism that I’m aware of that would prevent people from gaming the system. Blockchain make that a bit more difficult to forge, because with the nature of distributed ledgers you have many computers checking their own copy of the ledgers to safeguard your transactions from being maliciously forged by an attacker with cryptographic keys. That is quite literally the idea of “peer to peer modern fiats” system you were thinking of anyway, because this is one of the mechanism it have that can safeguard against forgery in a peer to peer network.

    Now let’s go back to it’s one core function, an alternative digital transaction system. I’ll bring up an MMO Game from France, called Wakfu, it got blocked and blacklisted by ALL of the merchant payment processing companies at one point in time (it was unblocked nowadays however.) Back then, you LITERALLY cannot buy subscription, in-store items, or whatever for that MMO game. They had to accept Doge Coins to work around the blockades from those merchant payment processing companies. Those merchant payment processing companies like Paypal, Stripe, Square, and so go on, impose arbitrary rules and guideline whether or not if they would work with you or not. If you cannot get those, you’re SOL, you are stuck between accepting Wire Transfers (pricey fees and a headache to use for customers depending on the banks), sending a check (may not work internationally), and so go on. Cryptocurrency is literally that alternative.

    Now let’s go into the gritty details about fees and chargeback disputes. Louis Rossmann kindly brought up about Credit Card fees and one of the issue is that they no longer issue you a refund for credit card fees if you are refunding to the customer and on top of that, in a chargeback dispute, win or lose, you have to pay 2.9% at least for the total charge back amount plus whatever fees on top of that. Cryptocurrency is on another extreme end of the spectrum, you only have to pay the transaction fees that are determined by the overall network in a peer to peer algorithm.

    Granted in cryptocurrency, If you buy something without an escrow and seller does not give you the item, you’re usually SOL unless you can sue them. You can avoid a lot of that headache with an escrow which is a service that basically hold on to your money, and let seller send you the item, you check if the item is legit/good and then the escrow would release that fund to the seller, if seller trying to dupe you, then the escrow would return the money you sent after you mail back the item to the seller.

    Granted, there are a lot of scams and fake-coins going around with Cryptocurrency, but it still to this day serves as an important alternative in a critically more centralized and business hostile payment processing world. I highly suggests watching Louis Rossmann’s video to realize that cryptocurrency is only going to be more important as time goes on.