Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quasarbright/scripts
shell scripts I find useful
https://github.com/quasarbright/scripts
Last synced: 26 days ago
JSON representation
shell scripts I find useful
- Host: GitHub
- URL: https://github.com/quasarbright/scripts
- Owner: quasarbright
- Created: 2024-01-27T05:38:56.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-01-27T07:02:32.000Z (12 months ago)
- Last Synced: 2024-11-06T07:42:13.124Z (3 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# scripts
shell scripts I find useful
# create-encrypted, edit-encrypted
These two scripts are used to create and edit password-protected files.example:
```
$ create-encrypted secret.md
```
enter a password and then once vim opens, type some secret stuff in the file and then save and exit. this will create `secret.md.gpg`.
```
$ edit-encrypted secret.md.gpg
```
enter the password and then once vim opens, edit your secret stuff in the file and then save and exit. this will edit `secret.md.gpg`The unencrypted text only ever exists in a temporary file that gets deleted once the editing is done. (the temporary file is created with `mktemp`)
# zip-and-encrypt, decrypt-and-unzip
These two scripts are used to manage password-protected directories.
For example:
```
$ mkdir secrets
$ echo "i like popcorn" > secrets/secret.md
$ zip-and-encrypt secrets
$ rm -rf secrets
```
This creates `secrets.tar.gz.gpg`, which is password-protected.```
$ decrypt-and-unzip secrets.tar.gz.gpg
```
This gives you back `secrets/` once you enter the password. The workflow is storing the encrypted zip, decrypting and unzipping it, editing it, zipping and encrypting it, and then storing that.