Skip to content

Instantly share code, notes, and snippets.

@why-not
Created November 2, 2022 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save why-not/4e9f8baae51b17031ffdba4d69d347af to your computer and use it in GitHub Desktop.
Save why-not/4e9f8baae51b17031ffdba4d69d347af to your computer and use it in GitHub Desktop.
useful bash functions backup.
function addpythonpath {
PYTHONPATH=$PYTHONPATH:`pwd`
sed -i '' '/^PYTHONPATH/d' ~/.bashrc
sleep .5
echo PYTHONPATH=$PYTHONPATH >> ~/.bashrc
}
# install yt-dlp first for this to work.
# streams youtube videos via VLC.
function ytvlc {
yt-dlp --get-url --format best $1 | "/Applications/VLC.app/Contents/MacOS/VLC" --meta-title $1 --no-video-title -
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment