Barrel of Tips

tips.json
  • Stat Perms

    April 22, 2025 - files

    Stat Perms
    alias perm="stat -c '%n %U:%G-%a'"
    Nicely formatted stat output
  • Convert video to gif

    April 21, 2025 - media

    Convert video to gif
    ffgif() { p="fps=10,scale=${4:-320}:-1:flags=lanczos"; ffmpeg -y -ss ${2:-0} -i "$1" -to ${3:-0} -vf ${p},palettegen -loglevel error .p.png \ && ffmpeg -ss ${2:-0} -i "$1" -i .p.png -to ${3:-0} -loglevel error -filter_complex "${p}[x];[x][1:v]paletteuse" "${1%.*}".gif \ && rm .p.png; }
    Takes any video file and converts it to a gif.
  • Get the weather

    April 18, 2025 - weather

    Get the weather
    weather() { curl -s 'wttr.in'; }
    Get the weather from wttr.in into your terminal. Run with just "weather".