···11# my-bash-scripts
2233-These are the basic bash scripts I've made for myself. They're made for macOS, so there's no guarantee they'll work on other OS-es.
33+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.
4455## Install
66···17171818## Scripts
19192020+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.
2121+2022### welp
2121-Lists all these scripts, aka everything in the `bin` folder.
2222-2323-### chill
2424-2525-```
2626-chill
2727- Do nothing for a specified amount of time. Useful for scheduling stuff.
2828-2929-Usage examples:
3030- chill 1h
3131- chill 30m
3232- chill 50h 1m
3333-```
2323+Lists all scripts in the `bin` folder.
34243525### dco
3626Basic wrapper around the `docker-compose` command. The command works the same as `docker-compose`, except:
···4737 complete --command dco --wraps docker-compose
4838 ```
49395050-### copy
5151-Run a command and copy the output to the clipboard. For example, run `copy pwd` to copy the current path.
5252-5353-```
5454-Usage:
5555- copy <command> [args...]
5656-```
5757-5858-### md5compare
5959-Compares md5s of two files.
6060-6161-```
6262-Usage: md5compare <file1> <file2>
6363-```
6464-6565-### render
6666-This will render [After Effects](https://www.adobe.com/products/aftereffects.html) projects, assuming you have After Effects installed in `/Applications/Adobe After Effects CC 2019` (Specifically, the `aerender` file needs to be in there). Running `render` shows the syntax:
6767-6868-```
6969-Usage:
7070- render [options] <file> [file...]
7171-7272-Options:
7373- file .aep file for After Effects' aerender to render.
7474- -h, --help Show this help text
7575- -k, --kill Kill allaerendercore processes (they tend to get stuck).
7676- DO NOT use this if you have multiple renders running!
7777-```
7878-7979-### reset-permissions
8080-Resets permissions of a directory. You should probably know what you're doing before running this.
8181-8282-Running `reset-permissions` shows the syntax:
8383-8484-```
8585-reset-permissions
8686-usage: reset-permissions <username> <directory>
8787-```
8888-8989-This is the command it will run:
9090-9191-```
9292-sudo chmod -RN <DIRECTORY> && \
9393-sudo chown -R <USERNAME> <DIRECTORY> && \
9494-sudo chmod -R 755 <DIRECTORY>
9595-```
9696-9740### sleepy
9898-Hibernates your computer. I usually run this after `render` or `chill`.
9999-100100-### sfx
101101-102102-```
103103-sfx:
104104- Play a sound effect. Example: sfx ding.
105105-106106-Usage:
107107- sfx <sound>
108108-109109-Sounds:
110110- ding beep
111111-```
112112-113113-### to-gif
114114-Requires [ffmpeg](https://ffmpeg.org) (which I recommend installing using [Homebrew](https://brew.sh)).
115115-116116-Converts videos into gifs. If you do this frequently I would probably use some app instead.
117117-118118-Running `to-gif` shows the syntax:
119119-120120-```
121121-Syntax: to-gif <file> [fps] [scale] [duration] [start_at]
122122- file: File to convert to gif. Required.
123123- fps: Defaults to 15.
124124- scale: GIF resolution. Defaults to 1.
125125- duration: How long the gif will be, in seconds. Defaults to 999999.
126126- start_at: Where the video starts, in seconds. Defaults to 0
127127-```
4141+Puts your computer to sleep.