Live data from Hacker News

Scripts I wrote that I use all the time

evanhahn.com

71–80 of 408 posts

Re: Scripts I wrote that I use all the time

#71
post #46

Earlier quoted context omitted.

I think it's more likely to say that this comes from a place of laziness than some enlightened peak. (I say this as someone who does the same, and is lazy). When I watch the work of coworkers or friends who have gone these rabbit holes of customization I always learn some interesting new tools to use - lately I've added atuin, fzf, and a few others to my linux install

I went through a similar cycle. Going back to simplicity wasn't about laziness for me, it was because i started working across a bunch more systems and didn't want to do my whole custom setup on all of them, especially ephemeral stuff like containers allocated on a cluster for a single job. So rather than using my fancy setup sometimes and fumbling through the defaults at other times, i just got used to operating mor…

You can apply your dotfiles to servers you SSH into rather easily. I'm not sure what your workflow is like but frameworks like zsh4humans have this built in, and there are tools like sshrc that handle it as well. Just automate the sync on SSH connection. This also applies to containers if you ssh into them.

Re: Scripts I wrote that I use all the time

#72
post #7

Earlier quoted context omitted.

The nato phonetic alphabet is still useful even if the other party doesn't know it, I've used it a bunch of times on the phone to spell out my 10- letter last name. Saves quite a lot of time and energy for me vs saying "letter as in word" for each letter.

Right but it's not much more useful than any other phonetic alphabet the other party doesn't know, including the one you make up on the spot.

If you're me, it's still useful because the ones I make up on the spot aren't great.

"S-T-E-V-E @ gmail.com, S as in sun, T as in taste, ..." "Got it, fpeve."

Re: Scripts I wrote that I use all the time

#73
post #4

It's been a while since I haven't read something as useful! There also some very niche stuff that I won't use but found funny

The nato phonetic alphabet one cracked me up. My dude you don't need that, call center employees don't know it, just say S as in Sugar like ur grandma used to.

The NATO alphabet is made of commonly known words that are hard to misspell and hard to mishear (at least the initial phonemes). The person on the other end doesn't need to be able to recite the words, they just need to be able to hear "november" and recognize that it starts with N.

Re: Scripts I wrote that I use all the time

#75

It's weird how the circle of life progresses for a developer or whatever. - When I was a fresh engineer I used a pretty vanilla shell environment - When I got a year or two of experience, I wrote tons of scripts and bash aliases and had a 1k+ line .bashrc the same as OP - Now, as a more tenured engineer (15 years of experience), I basically just want a vanilla shell with zero distractions, aliases or scripts and use…

It's the bell curve meme all along.

Re: Scripts I wrote that I use all the time

#76
Nice! Tangentially related: I built a (MacOS only) tool called clippy to be a much better pbcopy. It was just added to homebrew core. Among other things, it auto-detects when you want files as references so they paste into GUI apps as uploads, not bytes.

  clippy image.png  # then paste into Slack, etc. as upload

  clippy -r         # copy most recent download

  pasty             # copy file in Finder, then paste actual file here
https://github.com/neilberkman/clippy / brew install clippy

Re: Scripts I wrote that I use all the time

#77
post #55

I have a bunch of little scripts and aliases I've written over the years, but none are used more than these... alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..' alias ......='cd ../../../../..' alias .......='cd ../../../../../..'

Does zsh support this out-of-the-box? Because I definitely never had to setup any of these kinds of aliases but have been using this shorthand dot notation for years.

Yes it does.

Re: Scripts I wrote that I use all the time

#79
post #7

Earlier quoted context omitted.

The nato phonetic alphabet is still useful even if the other party doesn't know it, I've used it a bunch of times on the phone to spell out my 10- letter last name. Saves quite a lot of time and energy for me vs saying "letter as in word" for each letter.

Right but it's not much more useful than any other phonetic alphabet the other party doesn't know, including the one you make up on the spot.

I dunno, there's a pretty good chance that the one that people spent time and effort designing to replace earlier efforts with the goal of reducing potential ambiguity and for use over noisy connections with expectation that mistakes could cost lives is probably better than what you improvise on the spot

Re: Scripts I wrote that I use all the time

#80
These are great, and I have a few matching myself.

Here are some super simple ones I didn't see that I use almost every day:

cl="clear"

g="git"

h="history"

ll="ls -al"

path='echo -e ${PATH//:/\\n}'

lv="live-server"

And for common navigation:

dl="cd ~/Downloads"

dt="cd ~/Desktop"

Post reply on HN