News for hackers. Stuff that matters.
Re:Show HN: Boulette - Protect you from yourself (even as ro... by jiscariot on Friday January 10, 2025 @10:25AM (#42656427)
For me, what is more common is the likelihood of doing something in the wrong environment (e.g. lab, dev, stage, prod). To help make things a bit more clear, our images now override the PS1 with a `(environment)` at the beginning, which is a different color, lab=green, dev=purple, prod=red. If it saves me once, it was worth it.
Re:Show HN: Boulette - Protect you from yourself (even as ro... by franktankbank on Friday January 10, 2025 @11:18AM (#42656985)
Double deep environment protection. True prod servers can't be deployed to except from special terminal which only appears visible to the ProdGlasses(TM). If you are wearing ProdGlass(TM) you receive mild brain wave stimulation which is collected for "product control purposes"(TM) future product development(patent pending).
Re:Show HN: Boulette - Protect you from yourself (even as ro... by drcongo on Friday January 10, 2025 @12:09PM (#42657519)
I have iTerm set up to change the background colour of a shell based on whether it's local, docker, staging or production, and on top of that prompt colours change depending on how privileged the user is. Without all this, I'm sure I'd be making terrible mistakes on a regular basis.
Re:Show HN: Boulette - Protect you from yourself (even as ro... by jiscariot on Friday January 10, 2025 @01:04PM (#42658102)
I'm always running in tmux panes so often iterm and those settings seem to conflict. It would be great to go a step further and include a background color change--will have to give it another shot. Thanks for the tip.
Re:Show HN: Boulette - Protect you from yourself (even as ro... by oslem on Friday January 10, 2025 @10:30AM (#42656482)
I’ve tried using iTerm2’s automatic profile switching feature to adjust the theme depending on the connection, but I’ve never been able to get it to work reliably.
Re:Show HN: Boulette - Protect you from yourself (even as ro... by jean_dupont on Friday January 10, 2025 @10:44AM (#42656601)
I think such a thing can be achieved easily with the starship prompt!
Re:Show HN: Boulette - Protect you from yourself (even as ro... by binwiederhier on Friday January 10, 2025 @11:01AM (#42656797)
I've used this successfully in the past for Terminator: https://github.com/GratefulTony/TerminatorHostWatch
Re:Show HN: Boulette - Protect you from yourself (even as ro... by reddit_clone on Friday January 10, 2025 @01:09PM (#42658152)
I too use iTerm's profiles to change background colors, fonts etc. to indicate where I am.

Reduces number of fat fingering disasters.

Re:Show HN: Boulette - Protect you from yourself (even as ro... by eternityforest on Saturday January 11, 2025 @06:53PM (#42669949)
That's really cool!

I alias cd to always show the first few files in a directory, but a better chance of noticing if I'm in the wrong place, and I always make internal IoT controls show the hostname in the top nav bar.

If I have made a mistake once, or imagined a mistake that could be possible, I pretty much always start thinking of technical countermeasures.

Re:Show HN: Boulette - Protect you from yourself (even as ro... by fasten on Tuesday January 14, 2025 @10:01AM (#42698011)
nice approach. highlighting key info like hostname can definitely help prevent mistakes