2013年1月31日木曜日

vim: set syntax highlight


when I set up the php-fpm, I realized that I cannot get syntax highlight for vim to edit php-fpm.d/www.conf.

I looked around the file and recognized that the file syntax is similar to php.ini.

and I also realized that I can get syntax highlight for php.ini.

so at first, look at the filetype of the php.ini

:set filetype
#=> filetype=dosini

as I could get the filetype that I have to specify, let's try it.


:setf dosini


its work! :)

synonym is bellow:

:set filetype=language


2013年1月18日金曜日

stty: standard input: Invalid argument

Back Ground

I got error "stty: standard input: Invalid argument" when I ssh to remote server.
It annoyed me for cron batch procedure that send mail STDERR of the batch.

Investigation

I wrote the command bellow for my favor.
stty werase undef
bind '"\C-w": backward-kill-word'
and the stty command was bad. if you put the snipet above, you can avoid get the error for first ssh login, but you will not enable the snipet when you start "screen".

Solusion

# enable only when login via interctive shell
if [ -n "$PS1" ] ; then
  stty werase undef
  bind '"\C-w": backward-kill-word'
fi
happy coding! :)

2013年1月17日木曜日

how does "desired capacity" work for autoscale?


test results



conclusion


  • "desired capacity" is flexible changing
  • "min size" and "max size" is stronger than I expected.