Barrel of Tips

tips.json
  • Stream Audio

    May 15, 2025
    Turn any audio file into a streaming server.
    Stream Audio
    arecord -f cd | ffmpeg -re -i - -hide_banner -loglevel quiet -stats -acodec libmp3lame -ab 128k icecast://source:1234@$ip_addr:8000/a.mp3
    Read More
  • External Ip from Resolver

    May 10, 2025
    External ip address resolution, without using a web service.
    External Ip from Resolver
    alias externalip="dig @resolver1.opendns.com myip.opendns.com +short"
    Read More
  • Autotyper

    May 1, 2025
    Function to quickly setup autotyping, wherever you might need it.
    Autotyper
    autotype() { sleep 3; xdotool type --delay 60 "$@"; }
    Read More
  • Convert video to gif

    April 21, 2025
    Takes any video file and converts it to a gif.
    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; }
    Read More
  • Get the weather

    April 18, 2025
    Get the weather from wttr.in into your terminal. Run with just "weather".
    Get the weather
    weather() { curl -s "wttr.in/$(echo $@ | tr ' ' '+')"; }
    Read More