r/ruby • u/gurgeous • Apr 06 '26
gist with some stuff I use everywhere (RunKit)
Guys, I write like a million ruby bin scripts every week both by hand and with LLMs. I use these all the time. Not quite gem-worthy but maybe a gist would be helpful for someone?
RunKit - https://gist.github.com/gurgeous/49f216d6d867abaaebd8a26a966b2dc5
Each of these is a handful of lines:
json read/write, csv read/write (hash-like), text read/write (including `.gz`)
`shell` and `shell!`, returns stdout/stderr
banner/warning/fatal - pretty colored output with timestamps
...
A typical example from today's project might involve fetching some tar files, logging http requests with `banner`, untarring with `shell` and then writing csv/json to /tmp.
3
u/Live_Appointment9578 Apr 06 '26
If it works, I'm happy for you! In software engineering there's too much ego, and for many people everything should be "perfect". I liked the script, keep it up!
1
u/aardaappels Apr 06 '26
Lots of bugs in your code. At least add tests.
1
u/No_Ostrich_3664 Apr 06 '26
Good effort, but maybe worth reshaping before sharing it to public. In any way, good job!
3
u/[deleted] Apr 06 '26
[removed] — view removed comment