home | lab | find me | science | publications | software | toolbox | blog | site map

My toolbox

How are these pages made and maintained

First, how are these pages not made: not with php, not with mysql bindings. I have used and I use php a lot and databases as well, but I think it's not a good idea to assemble web pages over and over again on the fly when such pages rarely ever change.

So what I did is to create:

In this fashion, I can have all the flexibility in the contents, while very easily cross-link my pages without typing in barely any links at all. And of course fix broken links trivially. The .htm extension is recognized by vim and other text editors for proper HTML syntax highlighting, which is very convenient. All generated pages are .html, and the old .html pages are automatically backed up before creating new versions.

Everytime I update one of the pages, I just run the update-all.sh script.

Download the package here: personal.tar.gz

The scripts contain regular expression spike fences of my own cooking like the following (and yes it makes perfect sense to me):

# Safely create hyperlinks for a given keyword, unless it's part of
# a hyperlink already or is contained within tags of some sort.
function makeSedHref {
	echo '-e s/\(<[^>]*"[^">]*\)\('$1'\)\([^">]*"[^>]*>\) \
	/\1NOT\2NOT\3/g -e s/\(<[ah][^>]*>[^<]*\)\('$1'\)\([^>]*< \
	\/[ah][^>]*>\)/\1NOT\2NOT\3/g -e s/\(\b'$1'\b\)/<a href="'$(echo $2 | \
	sed -e 's/\//\\\//g')'">\1<\/a>/g -e s/NOT\('$1'\)NOT/\1/g'
# use like (notice how white spaces are replaced by dots; see add_links.sh):
sed $(makeSedHref 'Institute.of.Neuroinformatics' 'http://www.ini.uzh.ch')

My development environment

These are the programs I use for coding:

And I run them all in several GNU/Linux ubuntu machines. I used to run FreeBSD and other flavors of Linux, and even MacOSX during many years. But nowadays I just want a machine that works and has updated software repositories.

Tricks and tips

Last updated: 2012-05-08 11:10 Zurich time. Copyright Albert Cardona.