Skip to content

Instantly share code, notes, and snippets.

View mcking-07's full-sized avatar

Mohammed Muzammil Anwar mcking-07

View GitHub Profile
@mcking-07
mcking-07 / ex.sh
Created April 21, 2024 16:29
zipfile extractor
ex() {
if [ -f "$1" ]; then
case $1 in
*.tar.gz) tar xzf $1;;
*.rar) unrar x $1;;
*.gz) gunzip $1;;
*.tar) tar xf $1;;
*.tgz) tar xzf $1;;
*.zip) unzip $1;;
*.7z) 7z x $1;;
@mcking-07
mcking-07 / pload.sh
Created April 21, 2024 16:28
python env manager
pload() {
local ENV_DIR=".pyenv"
local SCRIPT_PATH="$ENV_DIR/bin/activate"
if [ -d "$ENV_DIR" ] && [ -f "$SCRIPT_PATH" ]; then
source "$SCRIPT_PATH"
else
read -p "environment not found. create one? (Y|n) " choice
case $choice in
Y|y|"")