Skip to content

Instantly share code, notes, and snippets.

View pulkitgoyal56's full-sized avatar
🔥

Pulkit Goyal pulkitgoyal56

🔥
View GitHub Profile
@pulkitgoyal56
pulkitgoyal56 / checkvenv.py
Last active July 10, 2021 02:30
Check if Python interpreter is from a virtual environment
import sys
def get_base_prefix_compat():
"""Get base/real prefix, or sys.prefix if there is none."""
return getattr(sys, "base_prefix", None) or getattr(sys, "real_prefix", None) or sys.prefix
def in_virtualenv():
return get_base_prefix_compat() != sys.prefix
in_virtualenv()
@pulkitgoyal56
pulkitgoyal56 / install-zsh-windows-git-bash.md
Last active December 20, 2022 20:18 — forked from fworks/install-zsh-windows-git-bash.md
Zsh / Oh-my-zsh on Windows Git Bash
@pulkitgoyal56
pulkitgoyal56 / $SCRIPTS
Last active July 9, 2024 14:47
Scripts
#!/usr/bin/env sh
## Clone Gist to ~/scripts
git clone git@gist.github.com:4b1b573c408d3a7d488fe77d20c984c7.git ~/scripts
## Run Setup Script
~/scripts/setup.sh