Skip to content
View bencres's full-sized avatar

Highlights

  • Pro

Organizations

@HytaleModding

Block or report bencres

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
bencres/README.md

Useful Stuff

Python Virtual Environments

Snippet to automatically activate an existing virtual environment or initialize and activate a new one.

Usage: add to your .zshrc, source it, then just run pyvenv.

pyvenv() {
    # Check if .venv directory already exists
    if [ -d ".venv" ]; then
        echo "Found existing environment. Activating..."
    else
        echo "Creating new virtual environment..."
        python3 -m venv .venv
        
        # Automatically add .venv to .gitignore if it's not already there
        if [ -f ".gitignore" ]; then
            if ! grep -qs "^.venv/" .gitignore; then
                echo ".venv/" >> .gitignore
                echo "Added .venv/ to .gitignore."
            fi
        fi
    fi

    # Activate and confirm
    source .venv/bin/activate && \
    echo "Virtual environment at $(pwd)/.venv activated!"
}

Pinned Loading

  1. pxf-lab/uab pxf-lab/uab Public

    Python 1

  2. pxf-lab/vfxdirs pxf-lab/vfxdirs Public

    A Python library for accessing useful paths for common visual effects software on any operating system.

    Python

  3. HytaleModding/site HytaleModding/site Public

    Hytale Modding Website - your one stop shop for all guides & docs related to Hytale.

    MDX 233 149

  4. houdini-package-template houdini-package-template Public

    A template for Houdini package creation.

    Python

  5. site site Public

    TypeScript

  6. zed-django-snippets zed-django-snippets Public

    Django snippets for Zed.

    2 2