Earlier quoted context omitted.
Ok, I think I copied that from somewhere... Pretty sure it's not my comment. But still... Lecturing people with rubbish arguments and a horrible attitude sounds like what you're doing. Big world out there. You can have people who like colors and those who don't. Neither have to be pretending they're all that and hate the other. :) Friends? Please submit a PR with a better comment if you like. I honestly didn't think…
I'm nearly certain that is a default message included in a lot of .bashrc files. I've seen it on Debian and Ubuntu. I agree with his criticism but certainly not with how he conveyed it. I love colour :)
Show HN: Useful scripts and environment setup for coding in VPS
21–30 of 31 posts
Re: Show HN: Useful scripts and environment setup for coding in VPS
#22Earlier quoted context omitted.
Ok, I think I copied that from somewhere... Pretty sure it's not my comment. But still... Lecturing people with rubbish arguments and a horrible attitude sounds like what you're doing. Big world out there. You can have people who like colors and those who don't. Neither have to be pretending they're all that and hate the other. :) Friends? Please submit a PR with a better comment if you like. I honestly didn't think…
Oh, I wasn't faulting you, most of these comments in rc files typically come all the way from some random flame in 1998 or something. > You can have people who like colors and those who don't. I absolutely agree, which is why I'd remove any opinion from the comment. "Default is off". End of story.
Re: Show HN: Useful scripts and environment setup for coding in VPS
#23I use something similar to configure my entire desktop from a default Debian install using idempotent shell scripts. The repo isn't public since it contains a lot of sensitive information but I'm currently developing something based on that for a server I'm working on: https://github.com/T0astBread/easymark-server-config
I wonder if you could do the same with Ansible ?
Re: Show HN: Useful scripts and environment setup for coding in VPS
#24Earlier quoted context omitted.
I'm nearly certain that is a default message included in a lot of .bashrc files. I've seen it on Debian and Ubuntu. I agree with his criticism but certainly not with how he conveyed it. I love colour :)
I like how color looks for a short time but when working all day in vim I find I think better with just two colors and no syntax. I think I just got used to that in shell .. but then I do like the link/executable highlights... Maybe I'm missing a huge world of color in bash prompt... I just don't know how to do it, or do it well...haha. Wanna spruce up my prompt? ;P :) you're welcome to submit if you want, a change :…
Re: Show HN: Useful scripts and environment setup for coding in VPS
#25Earlier quoted context omitted.
I like how color looks for a short time but when working all day in vim I find I think better with just two colors and no syntax. I think I just got used to that in shell .. but then I do like the link/executable highlights... Maybe I'm missing a huge world of color in bash prompt... I just don't know how to do it, or do it well...haha. Wanna spruce up my prompt? ;P :) you're welcome to submit if you want, a change :…
I hope I remember this tomorrow, I'll try to convert you ;) haha
Re: Show HN: Useful scripts and environment setup for coding in VPS
#26> # uncomment for a colored prompt, if the terminal has the capability; turned off by default to not distract the user: the focus in a terminal window should be on the output of commands, not on the prompt :eyeroll: What a horrible attitude. The point of coloring is precisely to help users focus on the output that matters , rather than forcing them to parse and reparse a chunk of stuff they don't care about. If the p…
Ok, I think I copied that from somewhere... Pretty sure it's not my comment. But still... Lecturing people with rubbish arguments and a horrible attitude sounds like what you're doing. Big world out there. You can have people who like colors and those who don't. Neither have to be pretending they're all that and hate the other. :) Friends? Please submit a PR with a better comment if you like. I honestly didn't think…
# Color variables to make our output a little easier on the eyes. Respect
# NO_COLOR, in case the user does not want any.
if [[ -t 1 && -z "${NO_COLOR:-}" ]]; then
readonly c_red='\033[0;31m'
readonly c_blue='\033[0;34m'
readonly c_green='\033[0;32m'
readonly c_bold='\033[1m'
readonly c_reset='\033[0m'
fi
I have no idea why I added that readonly command there, though, but by now I am
afraid to remove it.The NO_COLOR[2] environment variable is not exactly a standard as far as I know, but it is supported by enough command-line software that it feels like one to me.
Re: Show HN: Useful scripts and environment setup for coding in VPS
#27I’d love to hear more specifics about what kind work you do. I saw Node, so I’m guessing backend Node development? Do you do front end too? If so, what’s your workflow for running a dev web server and accessing it from a browser?
Thanks Roben! :) Yes full stack, and the way I run most dev is to run it in the same server as production, but in another clone of the repo in a different directory, a different branch, and a dev port, like 6667. But keep the same certs TLS, and create a clone or dev version of the db. Then just access the same as normal but on the other port. Occasionally, for like a larger project with load balancers, I'll run an e…
Re: Show HN: Useful scripts and environment setup for coding in VPS
#28The install scripts lack `set -e` (or `set -xeuo pipefail`, which is what I've memorized), so if a command fails, the scripts just keep on steamrolling forward. Then again, these scripts are clearly tailored for OP, since they contain their name and email, so it's... not like these would be usable as-is for anyone else. (Also, why is this published on Npm?)
-e : exit immediately if statement has non-zero exit status
-x : echo each command
-u : treat unset variables as an error
-o pipefail : If set, the return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status, or zero if all commands in the pipeline exit successfully.
that is actually much better than -xe, thank you, I learned something
Re: Show HN: Useful scripts and environment setup for coding in VPS
#29For the last couple of days, I've been trying to get a static website up using hugo (emacs + ox-hugo), and I've been using tramp to ssh into the machine and do my work. Tramp is literally magic. It just puts the right text into your buffer, where all the tools you use on your machine are just available by default. Even org exports and the like behave as expected, outputting the resultant file into the correct dir on…
Re: Show HN: Useful scripts and environment setup for coding in VPS
#30> # uncomment for a colored prompt, if the terminal has the capability; turned off by default to not distract the user: the focus in a terminal window should be on the output of commands, not on the prompt :eyeroll: What a horrible attitude. The point of coloring is precisely to help users focus on the output that matters , rather than forcing them to parse and reparse a chunk of stuff they don't care about. If the p…
In my scripts, I just check for unset term and/or use tput to get the sequences (which honors TERM=dumb)
one example:
col_ok=`tput bold; tput setaf 7; tput setab 2`
col_fail=`tput bold; tput setaf 7; tput setab 1`
col_end=`tput sgr0`
echo "${col_fail} ERROR: it failed ${col_end}"
so running the script gives me colorized output (xterm-256color),
but running it like this: TERM=dumb
gives plain text