[READ-ONLY] Mirror of https://github.com/probablykasper/my-bash-scripts. My personal bash scripts
cli
0

Configure Feed

Select the types of activity you want to include in your feed.

Shell 88.5%
JavaScript 9.5%
AppleScript 2.0%
61 1 0

Clone this repository

https://tangled.org/kasper.space/my-bash-scripts https://tangled.org/did:plc:zegfzgv7pb7gz3lqwv5xh4ks
git@tangled.org:kasper.space/my-bash-scripts git@tangled.org:did:plc:zegfzgv7pb7gz3lqwv5xh4ks

For self-hosted knots, clone URLs may differ based on your setup.



README.md

my-bash-scripts#

These are the basic bash scripts I've made for myself. They're made for macOS, so some of them may not work on other platforms.

Install#

  1. Download the scripts and put them in whatever folder you want. In my case, I just keep them with my other git repos.
  2. Add the folder to your PATH, so you can call the scripts by their filename in your terminal from anywhere.
  • For bash, add the following to your ~/.bash_profile:
    export PATH=<YOUR_FOLDER>:$PATH
    
  • For fish, add the following to your ~/.config/fish/config.fish:
    set PATH "/Users/kasper/dev/git/my-bash-scripts/bin:$PATH"
    

Scripts#

Some of the scripts are described below. To see the help menus for the other scripts, either open the files inside bin or run the commands directly.

welp#

Lists all scripts in the bin folder.

to#

Usage:
    to <format> [options] <file1> [file2...]

Options:
    format           Format to convert to.
    --formats        List all supported formats.
    -v, --verbose    If you love logs.
    -h, --help       Show this help message.

    Prefix arguments with - to pass them directly to
    FFmpeg or ImageMagick, like --ac -128k.

Running to --formats shows the supported formats:

Video formats:
    mp4
    mp4-h265
    mov
    webm

Audio formats:
    mp3      320kbps. Custom bitrate example: mp3:128
    flac
    aiff
    opus     256kbps. Custom bitrate example: opus:128

Image formats:
    jpg      90 quality. Custom quality example: jpg:75 (0-100)
    png
    webp     90 quality. Custom quality example: webp:75 (0-100)
    gif

dco#

Basic wrapper around the docker-compose command. The command works the same as docker-compose, except:

  • When running dco run, the --rm argument is added (as long as -d or --detach are not present).
  • When running dco up, dco down runs afterwards (as long as -d or --detach are not present).

If you've installed auto completion for docker-compose (here's how to do that), this is how you can enable auto completion for dco:

  • For bash, add the following to your ~/.bash_profile:
    complete -F _docker_compose dco
    
  • For fish, add the following to your ~/.config/fish/config.fish:
    complete --command dco --wraps docker-compose
    

sleepy#

Puts your computer to sleep.