this post was submitted on 09 Jan 2025
148 points (99.3% liked)

Programmer Humor

19910 readers
1837 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

[Meme transcription:]

– Hey, why is the shell prompt on the production server red now?
– Earlier: me@prod:~$ docker container remove --force the-application

Protip: If you’re used to shutting down your computer via the CLI, make it a habit to use an alias like off.

This way you will never, ever turn off a remote server by accidentally using throwing poweroff at a residual SSH connection.

top 13 comments
sorted by: hot top controversial new old
[–] GreenKnight23@lemmy.world 10 points 9 hours ago

the fact that you can shell in from your local environment is more concerning than the fact that you killed prod.

hope you aren't supposed to hold any compliance requirements!

funny story though, you'll use this when you're mentoring later and some dumbass noob will still do it.

[–] Kidplayer_666@lemm.ee 39 points 17 hours ago (2 children)

Here we simply have a tool that on dangerous commands like power off or reboot asks for the host name of the machine in question. Didn’t stop me from accidentally rebooting a machine once, but no matter

[–] derbolle@lemmy.world 8 points 17 hours ago (1 children)

sounds interesting. do you have the name of the tool or is it a custom script

[–] Gyroplast@pawb.social 20 points 16 hours ago* (last edited 16 hours ago)
[–] whodatdair@lemmy.blahaj.zone 3 points 15 hours ago

Holy shit that’s brilliant

[–] timbuck2themoon@sh.itjust.works 2 points 9 hours ago

Man it's late here but I just don't get it. Isn't tmux enough to separate sessions then you just look before you run something like this?

[–] bleistift2@sopuli.xyz 19 points 17 hours ago (2 children)

If you’re using a descendant of Debian, you will find a line like this in your ~/.bashrc file:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$

The 32m part controls the color of the username. (\u). 1 is red, 2 is green (as seen in the user and host part, \u@\h), 3 (as seen for the directory, \w) is blue.

[–] fidgeting9658@lemmings.world 5 points 10 hours ago

Shell colors change the game really. I did this at work; when I'm on the admin server my prompt is rainbow, other servers black (I use a solarized light terminal). It has saved me so many times.

[–] 30p87@feddit.org 10 points 16 hours ago* (last edited 16 hours ago) (1 children)

Oh, so we're Winkelschleifern prompts now?

As normal user, the username is also green, and the # is a $

[–] Username@feddit.org 4 points 16 hours ago* (last edited 16 hours ago) (1 children)

Zangendeutsch leckt oder Autokorrektur?

[–] 30p87@feddit.org 2 points 16 hours ago (1 children)

Zangendeutsch war zu verlockend.

[–] bleistift2@sopuli.xyz 2 points 15 hours ago

Zangendeutsch ist zu hoch für mich.

[–] cupcakezealot@lemmy.blahaj.zone 5 points 16 hours ago

this is honestly my worst fear as someone who suffers from ocd and compulsive checking