[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.

Remove most scripts from readme

Kasper (Jan 7, 2022, 8:19 AM +0100) 3422cdff a347eebb

+5 -91
+5 -91
README.md
··· 1 1 # my-bash-scripts 2 2 3 - 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. 3 + 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. 4 4 5 5 ## Install 6 6 ··· 17 17 18 18 ## Scripts 19 19 20 + 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. 21 + 20 22 ### welp 21 - Lists all these scripts, aka everything in the `bin` folder. 22 - 23 - ### chill 24 - 25 - ``` 26 - chill 27 - Do nothing for a specified amount of time. Useful for scheduling stuff. 28 - 29 - Usage examples: 30 - chill 1h 31 - chill 30m 32 - chill 50h 1m 33 - ``` 23 + Lists all scripts in the `bin` folder. 34 24 35 25 ### dco 36 26 Basic wrapper around the `docker-compose` command. The command works the same as `docker-compose`, except: ··· 47 37 complete --command dco --wraps docker-compose 48 38 ``` 49 39 50 - ### copy 51 - Run a command and copy the output to the clipboard. For example, run `copy pwd` to copy the current path. 52 - 53 - ``` 54 - Usage: 55 - copy <command> [args...] 56 - ``` 57 - 58 - ### md5compare 59 - Compares md5s of two files. 60 - 61 - ``` 62 - Usage: md5compare <file1> <file2> 63 - ``` 64 - 65 - ### render 66 - 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: 67 - 68 - ``` 69 - Usage: 70 - render [options] <file> [file...] 71 - 72 - Options: 73 - file .aep file for After Effects' aerender to render. 74 - -h, --help Show this help text 75 - -k, --kill Kill allaerendercore processes (they tend to get stuck). 76 - DO NOT use this if you have multiple renders running! 77 - ``` 78 - 79 - ### reset-permissions 80 - Resets permissions of a directory. You should probably know what you're doing before running this. 81 - 82 - Running `reset-permissions` shows the syntax: 83 - 84 - ``` 85 - reset-permissions 86 - usage: reset-permissions <username> <directory> 87 - ``` 88 - 89 - This is the command it will run: 90 - 91 - ``` 92 - sudo chmod -RN <DIRECTORY> && \ 93 - sudo chown -R <USERNAME> <DIRECTORY> && \ 94 - sudo chmod -R 755 <DIRECTORY> 95 - ``` 96 - 97 40 ### sleepy 98 - Hibernates your computer. I usually run this after `render` or `chill`. 99 - 100 - ### sfx 101 - 102 - ``` 103 - sfx: 104 - Play a sound effect. Example: sfx ding. 105 - 106 - Usage: 107 - sfx <sound> 108 - 109 - Sounds: 110 - ding beep 111 - ``` 112 - 113 - ### to-gif 114 - Requires [ffmpeg](https://ffmpeg.org) (which I recommend installing using [Homebrew](https://brew.sh)). 115 - 116 - Converts videos into gifs. If you do this frequently I would probably use some app instead. 117 - 118 - Running `to-gif` shows the syntax: 119 - 120 - ``` 121 - Syntax: to-gif <file> [fps] [scale] [duration] [start_at] 122 - file: File to convert to gif. Required. 123 - fps: Defaults to 15. 124 - scale: GIF resolution. Defaults to 1. 125 - duration: How long the gif will be, in seconds. Defaults to 999999. 126 - start_at: Where the video starts, in seconds. Defaults to 0 127 - ``` 41 + Puts your computer to sleep.