Live data from Hacker News

Scripts I wrote that I use all the time

evanhahn.com

181–190 of 408 posts

Re: Scripts I wrote that I use all the time

#184
post #38

I have mkcd exactly ( I wonder how many of us do, it's so obvious) I have almost the same, but differently named with scratch(day), copy(xc), markdown quote(blockquote), murder, waitfor, tryna, etc. I used to use telegram-send with a custom notification sounnd a lot for notifications from long-running scripts if I walked away from the laptop. I used to have one called timespeak that would speak the time to me every h…

>I have mkcd exactly ( I wonder how many of us do, it's so obvious)

Mine is called "md" and it has "-p" on the mkdir. "mkdir -p $1 && cd $1"

Re: Scripts I wrote that I use all the time

#188
post #28

Earlier quoted context omitted.

why is this interesting to you? the whole point of doing all of this is to be more efficient in the long run. of course there is an initial setup cost and learning curve after which you will hopefully feel quite efficient with your development environment. you are making it sound like it is not worth the effort because you have to potentially spend time learning "it"? i do not believe that it takes long to "learning"…

It's interesting because there's a significant chance one wastes more time tinkering around with custom scripts than saving in the long run. See https://xkcd.com/1205/ For example. The "saves 5 seconds task that I do once a month" from the blog post. Hopefully the author did not spend more than 5 minutes writing said script and maintaining it, or they're losing time in the long run.

Not all time is created equally though, so I disagree with that xkcd.

If something is time sensitive it is worth spending a disproportionate amount of time to speed things up at some later time. For example if you’re debugging something live, in a live presentation, working on something with a tight deadline etc.

Also you don’t necessarily know how often you’ll do something anyways.

Re: Scripts I wrote that I use all the time

#189

> alphabet just prints the English alphabet in upper and lowercase. I use this surprisingly often (probably about once a month) I genuinely wonder, why would anyone want to use this, often?

For me it's when I call customer service or support on the phone, and either give them an account #, or confirm a temporary password that I have been verbally given.

Are you referring to the nato alphabet utility? Or the alphabet script that prints

  abcdefghijklmnopqrstuvwxyz
  ABCDEFGHIJKLMNOPQRSTUVWXYZ

Re: Scripts I wrote that I use all the time

#190
post #33

> trash a.txt b.png moves `a.txt` and `b.png` to the trash. Supports macOS and Linux. The way you’re doing it trashes files sequentially, meaning you hear the trashing sound once per file and ⌘Z in the Finder will only restore the last one. You can improve that (I did it for years) but consider just using the `trash` commands which ships with macOS. Doesn’t use the Finder, so no sound and no ⌘Z, but it’s fast, offici…

Trash command first appeared in macOS 14.0, which was 2023.
Post reply on HN