Archive for the Bash Category

Install Bad Wolf Color for Vim

| August 14th, 2015

So we have a good color for vim which give your more visualization about vim editor.

Bad Wolf looks like a good candidate

Here is the instruction how to install color for vim

1. Copy colors/badwolf.vim to ~/.vim/colors/badwolf.vim; create directories if needed. Alternatively, git clone into ~/.vim/bundles/ and use the Pathogen package manager, or specify the repository with the Vundle package manager, etc.

2. In your ~/.vimrc, put / replace any existing :colorscheme command with:
colorscheme badwolf

more »

When you are using special fonts for your terminal and it could not display correctly. We need to install these front to make it work better

So Powerline fonts is a good candidate and easy to install on MacOS and Linux
more »

Because I investigated this for a project, Linux (at least RHEL) mailx can use a remote SMTP server, thus enabling us to test whether that server allows email sending from our application.

mailx -S smtp=<smtp-server-address> -r <from-address> -s <subject> -v <to-address> < content.txt

Where “-S smtp ” is the crucial component (that apparently AIX mail/mailx doesn’t support) allowing you to send through a remote server rather than a locally-configured server.

-v is "verbose"
content.txt is a local file that contains the body of the test message I'm sending.

more »

Here is some command to test your puppet syntax

# "bundle exec rake spec" <= check whole puppet script
# "bundle exec rake spec SPEC_OPTS=-fd" <= with debug mode
# "bundle exec rake syntax" <= check syntax
# "bundle exec rspec spec/hosts/server_spec.rb" <= check puppet script on specific host

These are more compact and versatile forms of Hamish’s answer. They handle any mixture of upper and lower case letters:

read -r -p "Are you sure? [y/N] " response
case $response in

more »