Thought that this may be useful in my footie portal (comming soon ...).
prototype is a javascritp library that makes AJAX easy.
Gplotter leverages prototype to make plotting on google maps easy.
Great cheat sheet to get you up and running quickly with subversion. Handy when you forget those commands that you don't use very often.
Found this link to a great page which shows you how to create a meaningful error message from a Python exception.
When constructing some SQL with concat, noticed a very irritating thing that mySQL seemed to demand that there were no spaces between concat and the first bracket. caught me out lots of times and made debugging seem like a long drawn out process.
When I was searching for the mysql concat manual entry, found this link to MySQL Gotcha's which looked useful.
// Query to retrieve fixtures
$sql = "
SELECT
concat(DATE_FORMAT(f.fixtureDate, '%a, %d-%b'), ' - ', c.name), /* Sun, 16-Jan */
if (f.scoreStatus = 'F', /* Fixture not being played yet so don't show score details or status */
concat(if(ht.bbcUrl is not null,
concat('<a href=\"team.php?teamName=', ht.nameUrlencoded, '\">', f.homeTeam, '</a>'),
f.homeTeam),
' v ',
if(at.bbcUrl is not null,
concat('<a href=\"team.php?teamName=', at.nameUrlencoded, '\">', f.awayTeam, '</a>'),
f.awayTeam),
if(kickOff = 'n/a', '', concat(', ', f.kickOff)),
ifnull(concat(', ', f.tvChannelsAbbrev), '')),
concat(if(ht.bbcUrl is not null,
concat('<a href=\"team.php?teamName=', ht.nameUrlencoded, '\">', f.homeTeam, '</a>'),
f.homeTeam), ' ',
f.homeTeamScore, ' - ',
f.awayTeamScore, ' ',
if(at.bbcUrl is not null,
concat('<a href=\"team.php?teamName=', at.nameUrlencoded, '\">', f.awayTeam, '</a>'),
f.awayTeam),
if (f.fixtureDate = curdate(),
concat(', ', f.scoreStatus),
'')))
as fixtureOneLine
FROM
fixture f,
competition c,
team ht,
team at
If you have libmtp installed, it comes with some handy programs to help you query your mtp media device.
man mtp-tools - will list all the commands available.
mtp-detect - finds the player and spews out lots of information
mtp-sendfile - sends a file to the device and tells you the file number created
mtp-delfile - delete a file, use -n file-number or -f file-name
mtp-files - list all the files on the device (pipe to less or a file so you can browse)
When using with my Creative Zen, noticed that the Zen would put a file in the correct folder. e.g. if sending an .avi, it automatically puts it in the Videos folder.
Am using Amarok to sync podcasts etc which works very well. Was playing with mtp-tools when trying out video on the device. Still haven't found out the magic conversion needed!
Am also going to try and put some photos on the device, haven't had time yet!