Pink Shadows in Ubuntu (Compiz) after upgrading to Hardy Heron

At first I thought it was a cute effect that could be modified, but after playing around with the Compiz settings I realised this was actually a bug!

Some people have found success by installing the Nvidia drivers from their website instead of using the ones packaged with Hardy, however this also does the job nicely:

sudo rm /usr/lib/xorg/modules/libwfb.so
sudo ln -s /usr/lib/nvidia/libwfb.so.xserver-xorg-core /usr/lib/xorg/modules/libwfb.so

You are only deleting and recreating a symbolic link, so it’s nothing too drastic that you should be worried about trying. Just log out and back in again after doing it and you should see “normal” shadows which you can go ahead and edit on the “window decoration” section of the Compiz settings.

Almost Vegan but feeling better

Background

After a couple of weeks without lactose I’m starting to feel a bit better, my stomach has settled a bit and more importantly I haven’t feel so tired and malnourished for the last few days. As a vegetarian for almost 20 years I’m used to being picky about what I eat, but avoiding lactose (chocolate!!) has been very tough.

Things still aren’t perfect, I won’t go into the details, but at least my general outlook has improved and now I feel like I can start training a bit. It’s probably too late for the Gothenberg Half marathon which I have entered, that’s on the 17th May so doesn’t really give me enough preparation time. Last year I only gave myself about 2 weeks of training before doing the race, but I had been much more active in general back then so it didn’t go too badly.

The orienteering season has just started, and the weather is looking better and better so there will be opportunities to climb soon too - so I need to get my ass into gear, as my fitness level has taken a steep dive since I came to Norway.

I hope that by recording my training plans and progress online, it will motivate me and give me realistic targets to chase. Also anybody that wants to join me will be more than welcome.

Since this is the first plan - it will include tomorrow (Sunday) but future plans will be Mon - Sun as I don’t want to get accused of being one of those “week starts on Sunday” types :)

Plan for week 5th May 2008

  • Sun - Fixed orienteering course in Østmarka (details in this pdf) or if the weather is bad - climbing
  • Tue - Cycle to work, volleyball training
  • Wed - Cycle to work, cycle from work to norskkurs in city centre, probably train home ;)
  • More to come… (Mo has friends visiting so not sure about the weekend)

How to write complex queries using Propel

This is a monster subject, and I spent a long time scratching my head over a few things yesterday, until I came across this site:

http://propel.jondh.me.uk/

It’s developed by a Symfony user, and allows you to type in sql statements using nested braces for prioritising. The form will then return a nicely formatted block of Propel code.

It’s not perfect, and it doesn’t cover everything just yet, but it’s great for getting some ideas about the structure and how to use various criteria - it’s also spot on if you are trying to learn Propel and already know how to structure SQL statements.

Discuss this tool and/or contribute on the Symfony Forum

Using a combination of tools like this, and taking a look at the generated files in lib/model/om should give you a good push, and a bit of a shortcut to more complex queries than you may be used to - rather than having to trawl the Propel documentation.

Propel is complaining about a table that doesn’t exist

When you change your mind about your schema, and rename or remove any of your tables from your schema.yml or xml files, you must manually remove all the related classes in the lib/ folder.

Symfony does not delete these unused files when you run a build, so they will stack up and cause Propel errors, for example when calling propel-dump-data.

Of course you can safely delete the lib/om and lib/map folders and run the build again, but you should manually delete the relevant files in /lib as there could be some user generated content in there also. These files are unlikely to cause any errors but might as well be deleted as part of your clean up since they are effectively useless if you have removed their referenced tables from the schema.

Help! Symfony is ignoring my settings in app.yml

Something that just cropped up today…

As your site grows, and you add more and more config to the app.yml file, be very careful not to re-declare the same named element. Symfony will not warn you, and there will be no errors - but the second (lower) instance will simple overwrite the first!

For example, if you have forgotten that you already have an element called profile hiding near the top of the file, and you add another one called profile at the bottom, with all your profile page settings - the lower one will destroy the one higher in the file.

This can be hard to spot if you have been meticulously coding and added a default value to all your sfConfig::get() calls because chances are when you are developing the site, all your defaults will be the same as the ones you have specified in app.yml.

The problem will become apparent when an end user tries to change the configuration and the change is ignored, because Symfony is simply using the default value rather than the one the user thinks they are setting.

Careful out there kids!

« Previous PageNext Page »