Skip to content

Instantly share code, notes, and snippets.

@mihow
Last active October 20, 2025 01:05
Show Gist options
  • Save mihow/9c7f559807069a03e302605691f85572 to your computer and use it in GitHub Desktop.
Save mihow/9c7f559807069a03e302605691f85572 to your computer and use it in GitHub Desktop.

Revisions

  1. mihow revised this gist Jul 25, 2024. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions load_dotenv.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,5 @@ then
    export $(cat .env | xargs)
    fi

    # My favorite from the comments. Thanks @richarddewit
    set -a
    source .env
    set +a
    # My favorite from the comments. Thanks @richarddewit & others!
    set -a && source .env && set +a
  2. mihow revised this gist Jul 25, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion load_dotenv.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ then
    export $(cat .env | xargs)
    fi

    # My favorite from the comments
    # My favorite from the comments. Thanks @richarddewit
    set -a
    source .env
    set +a
  3. mihow revised this gist Jul 25, 2024. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion load_dotenv.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,10 @@
    # The initial version
    if [ ! -f .env ]
    then
    export $(cat .env | xargs)
    fi
    fi

    # My favorite from the comments
    set -a
    source .env
    set +a
  4. mihow renamed this gist Jan 24, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. mihow created this gist Jan 24, 2017.
    4 changes: 4 additions & 0 deletions runserver.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    if [ ! -f .env ]
    then
    export $(cat .env | xargs)
    fi