a nice tmux look configuration

The default satus bar of tmux looks poor and can be improved. A possible source: https://github.com/gpakosz/.tmux

git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .


The common and widespread status bar for screen, plus minor tweaks for the GNU screen configuration file (.screenrc). Copy from below or download it from here.

# Bind F11 and F12 (NOT F1 and F2) to previous and next screen window
bindkey -k F1 prev bindkey -k F2 next startup_message off

# Window list at the bottom.
hardstatus alwayslastline
hardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%< | %c | %D %d"

# Enable mouse scrolling and scroll bar history scrolling
termcapinfo xterm* ti@:te@

Bash if

if [ $value -eq 1 ]
  echo "Good job"
elif [ $value -gt 1 ]
  echo "Excellent job"
  echo "Nothing happened"


Twig PHP templating system

Twig is a popular templating system, from the creators of the Symphony framework. Here I describe a minimal startup guide for those preferring a manual installation (i.e. no composer).

require_once 'lib/Twig/Autoloader.php';  
$loader = new Twig_Loader_Filesystem('templates/');  
$twig = new Twig_Environment(     
   array( 'cache' => 'cache/')

$twig = new Twig_Environment($loader);

echo $twig->render('index.template', 
   array('name' => 'Andrea', 'surname' => 'Telatin')

where the index.template file is

Hello {{ name }} {{ surname }}!