Author: 70vtp

Strongly-typed access to EPiSever properties using generics and extension methods

When building an EPiServer template, a common task is to retrieve the value of a property before showing it on the page. This property could be of any type and may even be null if the content editor has not supplied a value. On our early EPiSever projects it was typical to find a utility method similar to that below, which would help to avoid NullReferenceExceptions

Read More “Strongly-typed access to EPiSever properties using generics and extension methods”

MySQL Backup Script

Here is a simple PHP backup script that I run from the commandline to backup mysql. Basically it uses mysql_hotcopy which basically locks a table that copies the physical mysql directoy database folder. All my script does is loop through all the databases to a backup directory, then it tar.gz the folder then deletes the copied folder. You could of couse customize this very easily.

Read More “MySQL Backup Script”