David Huby’s Blog Technical and business stuff

21Oct/090

Smarty’s nl2br How to replace newlines with HTML breaks

Replacing newlines with breaks is as easy as
{$variable|nl2br}

http://www.smarty.net/manual/en/language.modifier.nl2br.php

Tagged as: , No Comments
13Oct/090

Match a keyword recursively in php files

grep -R --include=*php my-keyword .

Tagged as: No Comments
12Oct/090

archive (tar and gzip) with timestamp in bash

#!/bin/bash
tar zcf "$1-archive-$(date + '%F-%H-%M').tar.gz" "$1"

Filed under: Sysadmin No Comments