Yeah, so I just spent about an hour trying to figure out why javascript had stopped working.
<script src="blah.js" type="text/javascript" /> will cause some very strange things to happen. You *must* have a closing tag.
<script src="blah.js" type="text/javascript"></script>
I recently upgraded from a WDTV media player to a WDTV Live. The WDTV is just a simple set top box that allows you to play video on your tv, much like an xbox 360 and a whole bunch of other devices. The WDTV live allows you to play stuff over the network which opens up a whole host of cool stuff if you use the mediatomb DLNA server software available for linux (google tversity if you want something similar for windows.
On Monday I recieved my shiny new Samsung Galaxy S mobile phone. I’ve been putting off getting a smart phone for quite some years now as I never felt there was anything worth spending money on, and after some experience with my ipod touch I was put off getting an iphone. Anyway, I felt like writing my thoughts on the device now I’ve had it a week.
The hardware
My first impressions were that it does indeed look a lot like the iphone 3g, and I found I was trying to press the standby button which wasn’t there quite often, as well as picking it up and holding it upside down.
Ok, so I decided to natively install Ubuntu 10.04 on my Studio 1555.. fairly impressed.. almost everything works out the box which is a bit annoying.
The only issue I’ve had is that the included proprietary ATI driver fails when you try to use suspend, however this is apparently easily circumvented by using the most recent driver from the ATI site (it was a bug with their driver.)
Using the open source driver results in poor power management, so I’d advise against doing that.
Trac is pretty easy to set up on Debian, here’s a mini guide of what I did to get it working nice and quick. You’ll probably want to configure users etc afterwards, but this should be enough to get going.
Install: apt-get install trac libapache2-mod-wsgi
Initiate the trac environment: trac-admin /var/www/srdev/trac/ initenv
Set permissions: chown -R www-data /var/www/srdev/trac/
Install the wsgi script and web resources. The first argument before ‘deploy’ should match the install environment (the path above.
I’ve recently moved john-hunt.com again, from Australia to Texas in the states. The reason for this is my web host here in Australia was crap and the server kept going down (among other things.) They weren’t that terrible (hence I won’t mention them), but not worth the hassle.
Anyway, hopefully this year john-hunt.com will undergo a bit of a transformation.
Recently discovered this while creating some web graphics in inkscape:
http://studio.imagemagick.org/pipermail/magick-users/2007-August/020001.html
convert -density 100 -background None [filename].svg -compress none -depth 16 [filename].png
Really quite handy seeing as my version of inkscape loses the alpha channel when exporting.
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /blah/somepage.php on line 123
The reason for this warning is because PHP4 can’t communicate with a MySQL5 server unless it’s using old passwords (set by using the OLD_PASSWORD() function below.)
There are two simple ways to fix this. The first would be to upgrade your version of php. Unless you *really* need php4 (or below?
Discovered some fun things in MySQL today..
Set the variable @id to 0: SET @id = 0;
Update the column id to be id + 1 - this will re-index your id column in one fell swoop. Very nice: UPDATE tblname SET id = (@id := @id + 1);
Set the first value for an auto_increment column: ALTER TABLE tblname AUTO_INCREMENT = 196; (this won’t work if there are rows with a higher value already in the table)
Amazingly, I’ve managed to get Ableton Live to work properly under Wine.. installation was a breeze, but getting it to decode MP3s properly was a head scratcher.
When I dragged an mp3 over into Ableton live, it would clip all over the place, even in the waveform which tipped me off that this wasn’t a hardware or emulation issue of some kind. Anyway, after faffing around with ffdshow and stuff, I finally found the answer: