Skip to content

nullbuddy1243/localhome

Repository files navigation

localhome

configs, tools, bash stuff, random.

diceware thing

shrug alias

ppypath: pretty bash PYTHONPATH

... more

webp to png

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.

;)

kitty terminal

https://sw.kovidgoyal.net/kitty/

trustme it rules

rebashrc

helpful lil alias

alias rebashrc="source /Users/{yr name}/.bashrc"

high use random cli progs

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

exa ls replacement

https://the.exa.website/

brew install exa and then add this to .bashrc

alias ll="exa -lah"

i alias ll because long live list long

nest upgrade

niche unless yr yr nest dev...

alias nestupgrade='npx npm-check-updates "/nestjs*/" -u'

put fortune in yr .bashrc for fun every time you open terminal

uh yeah just do that fortune

diceware string fixer thing

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.

why?

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

howto:

alias

alias diceware_="diceware | python3 /path/to/wherever/you/put/localhome/diceware_string_fixer.py '_'"

examples:

$ 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
--- ;) ---

shrug alias

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 '¯\_(ツ)_/¯' "

ppypath

pretty bash PYTHONPATH

alias ppypath="python3 -c 'import sys; from pprint import pprint as pp; pp(sys.path)'"

more whenver i get around to it lol

About

configs, tools, bash stuff, random.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published