5 ms·
> use a CSS manipulator such that my prod console is in a bright-freaking-red Chrome window with a red background. Blue for test, green for dev Ha, I do the sa
by icelancer 11y ago
> use a CSS manipulator such that my prod console is in a bright-freaking-red Chrome window with a red background. Blue for test, green for dev
Ha, I do the same thing. I learned about this from a previous job I had where prod/test webapps were functionally similar but had obnoxious coloring in the header. Very effective.
- eropple 11y agoVisual indications are so great, aren't they? I do it with terminals, too; prod servers get obnoxious red-background prompts. (Root terms on all my machines look different from unprivileged ones, too.)
- icelancer 11y agoHmm good idea. I haven't had any issue with it but it's trivial to change background colors. Probably not a bad idea. Thanks for the tip!
- tabio 11y agoWow, I can't remember the last time I ran a shell directly on a prod machine. The very thought feels so dirty now.
- zaroth 11y agoWhether it's shell literally, or "shell" as in, the window from which you ultimately perform shell-like things, there's still a place you perform these tasks and knowing when you are in simulation or actual is an important state to track.
- eropple 11y agoWhen you inherit your environment and are whipping it into shape, shit happens.
- ossreality 11y agoI don't know which emotion is stronger, knowing that you haves sooooo much config that is inherently different across your environments... is it empathy? sadness? frustration? exasperation <- probably exasperation. I'm exasperated by the amount that people try to assert this over and over. Bullshit. Learn to test better. Learn ther term "integration environment", better, if you think you know it.
- jebblue 11y agoHow do you know what's really going on on those machines and in their respective environments assuming they are geographically distinct?
- tomschlick 11y agoAny advice/tutorials on how to set this up? Ideally I'd like just that ssh session to change the text to red for prod boxes but then go back to my normal iTerm theme after exit...
- ghufran_syed 11y agoAny links to how to do this? My google-fu seems to be failing me. I'm assuming you somehow set things up so it automatically detects the page / content (based on the environment name or instance tags??) and changes the background?
- patio11 11y agoEasy way to do this in e.g. Rails: <body style="foo bar baz env-#{Rails.environment}"> Then use CSS like you would normally on body.env-production, body.env-development, etc.
- hobarrera 11y agoYou meant class, not style. But great tip though: <body class="foo bar baz env-#{Rails.environment}">
- mryan 11y agoOne way to do this is to look at the "awsc-login-display-name-account" div, which contains your account ID. You can then alter the look of the page (perhaps making the top header bright red) depending on which account ID is in use. Could make a nice Chrome extension...
- mateuszf 11y agoYou can use an extension like Greasemonkey, with a simple script which will extract aws account id and will apply some css based on it.
- eropple 11y agoI log into different Chrome profiles that style the same pages differently. Dumb and easy.