Skip to content

Instantly share code, notes, and snippets.

@uglygus
uglygus / venv_wrapper
Created June 23, 2024 13:56 — forked from dbtek/venv_wrapper
Python 3 venv wrapper. Manages all virtual environments under ~/.venv/ .
# venv_wrapper, manage all virtual environments under ~/.venv/
# Include following in .bashrc / .bash_profile / .zshrc
# See https://gist.github.com/dbtek/fb2ddccb18f0cf63a654ea2cc94c8f19
# Usage
# $ mkvenv myvirtualenv # creates venv under ~/.venv/
# $ venv myvirtualenv # activates venv
# $ deactivate # deactivates venv
# $ rmvenv myvirtualenv # removes venv
export VENV_HOME="$HOME/.venv"
@uglygus
uglygus / ffsplit
Last active November 14, 2022 17:57
losslessly splits a video file
function ffsplit() {
# bash function to losslessly split
# a video file into 10min segments (600 seconds)
for item in "$@"
do
ffmpeg -i "$item" -c copy -map 0 -segment_time 600 -f segment -reset_timestamps 1 "$item"_seg%02d.mov
done
}