configs, tools, bash stuff, random.
ppypath: pretty bash PYTHONPATH
do you hate it when you download a pic and its in WEBP format and then you cant open it locally from finder / explorer?
this bash script can be cron scheduled to run in a given folder and automatically converts all WEBPs into PNGs in place and puts them into a pngs_out/ folder too.
;)
https://sw.kovidgoyal.net/kitty/
trustme it rules
helpful lil alias
alias rebashrc="source /Users/{yr name}/.bashrc"
ffmpeg: osx brew: https://formulae.brew.sh/formula/ffmpeg
imgmagick osx brew: https://formulae.brew.sh/formula/imagemagick
youtube-dl https://youtube-dl.org/ i use this constantly
brew install exa
and then add this to .bashrc
alias ll="exa -lah"
i alias ll because long live list long
niche unless yr yr nest dev...
alias nestupgrade='npx npm-check-updates "/nestjs*/" -u'
uh yeah just do that fortune
having a CLI diceware on hand is stupidly useful for a variety of things. tbh, I end up using it multiple times a week.
Ive used it to generate big random word lists for Lorem Ipsum type stuff, coming up with random cool name for a service, assorted generative text / ML, and ofc coming up with passwords and secrets.
Using diceware from a CPU isn't recommended for high-security usecases, but IMO its fine to do for like, making new accounts on sites where it doesnt matter so much.
shouout to @yuvallanger OG author of the diceware rust crate.
The rust crate i use for CLI diceware prints words with spaces between, but i want a between_char
like_these_are_some_words in whatever casing you like.
Coulda forked and updated the diceware crate itself, still might. Wanted to make sure the script had no non-standard-lib deps, so only using stuff included with python3.
maybe will make it a proper bash script to handle args better. for now just quick and dirty
- get cli diceware from diceware
- make bash alias that pipes diceware into
python3 diceware_string_fixer.py
- can include a
between_char
as first param to change whats between the words. - source
.bashrc
- enjoy
$ diceware_
;)
alias diceware_="diceware | python3 /path/to/wherever/you/put/localhome/diceware_string_fixer.py '_'"
$ diceware | python3 diceware_string_fixer.py
no sys.argv[1] for between_char so using default _
_ 1 2
---
input: caddie patination refracted superstition laconic stooge padlocks licensees
between_char: _
---
caddie_patination_refracted_superstition_laconic_stooge_padlocks_licensees
--- :) ---
$ diceware | python3 diceware_string_fixer.py "_"
got sys.argv[1] = _
_ 1 2
---
input: diffidently disturbed textual bracket dynamics hugeness unknowns works
between_char: _
---
diffidently_disturbed_textual_bracket_dynamics_hugeness_unknowns_works
--- ;) ---
wacky mode
$ shrug
¯\_(ツ)_/¯
$ diceware | python3 diceware_string_fixer.py "¯\_(ツ)_/¯"
got sys.argv[1] = ¯\_(ツ)_/¯
¯\_(ツ)_/¯ 9 10
---
input: deflation iteratively backups dustmen centrifuged gullibility answered percentage
between_char: ¯\_(ツ)_/¯
---
deflation¯\_(ツ)_/¯iteratively¯\_(ツ)_/¯backups¯\_(ツ)_/¯dustmen¯\_(ツ)_/¯centrifuged¯\_(ツ)_/¯gullibility¯\_(ツ)_/¯answered¯\_(ツ)_/¯percentage
--- ;) ---
hate it when you need to search for the shrug emoticon string? no more!
$ shrug
¯\_(ツ)_/¯
put this in .bashrc
or wherever, then $ source .bashrc
alias shrug="echo '¯\_(ツ)_/¯' "
pretty bash PYTHONPATH
alias ppypath="python3 -c 'import sys; from pprint import pprint as pp; pp(sys.path)'"