1472 links
  • Animal
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
3 results tagged Local x
  • Prxy - Reverse proxy WireGuard pour votre homelab

    A tester

    June 12, 2025 at 3:23:07 AM GMT+2 - permalink -
    QRCode
    - https://korben.info/prxy-reverse-proxy-wireguard-homelab.html
    ReverseProxy Internet Services Local Réseau
  • Delete a local and a remote GIT branch - Aram Koukia

    Supprimer une branche en local :

    git branch -D maBranche

    Supprimer une branche distante :

    git push alias-du-repo-distant --delete maBranche
    November 25, 2019 at 4:33:57 PM GMT+1 - permalink -
    QRCode
    - https://koukia.ca/delete-a-local-and-a-remote-git-branch-61df0b10d323
    Git Supprimer Branche Local Distante
  • Local Variables

    A propos des variables de type local en Bash.

    Tout d'abord, la sécurité.
    Afin d'écrire plus rapidement, on se retrouve souvent à déclarer et initialiser la variable en même temps :

    local var="plouf plouf"

    Sauf qu'en faisant ça, l'ordre d'exécution est le suivant :

    • attribution de la valeur plouf plouf à la variable var;
    • restriction de la portée de la variable var au niveau local.

    Ce qui signifie que la variable reste accessible pendant un instant au niveau global. Il faut donc mieux faire la déclaration et l'instanciation en deux temps :

    local var
    var="plouf plouf"

    Ce qui m'amène au deuxième point. Une fois qu'une variable a été déclarée local, il n'est pas besoin de remettre le mot-clef local à chaque instanciation. Ainsi, si je considère le script suivant :

    #/usr/bin/env bash
    
    ma_fonction()
    {
        local var = "ALEX"
        echo "$var"
    
        var="TOM"
        echo "$var"
    }
    
    ma_fonction
    
    echo "<$var>"

    La sortie sera :

    ALEX
    TOM
    <>
    June 26, 2018 at 6:48:10 PM GMT+2 * - permalink -
    QRCode
    - http://tldp.org/LDP/abs/html/localvar.html
    Linux Bash Local Variable
Links per page: 20 50 100
Shaarli - The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community - Help/documentation