Viewing events attached to elements via JavaScript
If like myself, you often attach functions to elements using jQuery, for example: $(‘.btnName’).live(‘click’, function() { //do something }); There is a nice little browser extension that will show all the elements on the page with a little bubble outlining the attached events/functions. It is written by Allan Jardine, and you can get it from [...]
MySQL Error in create table syntax ‘USING BTREE’
We had an odd thing today, whilst performing a apply-db-changes we received the error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘USING BTREE, KEY `index` (`fields`)’ at line 1 It worked fine before, so why won’t ant [...]
Setting up Class Table Inheritance with Doctrine 2.0
Have had some serious problems getting this working, but after a 4 hour head bashing session, we’ve cracked it. CREATE TABLE inventory( inventory_id INT AUTO_INCREMENT, discriminator_column VARCHAR(20), category VARCHAR(50) NOT NULL, part_number VARCHAR(50) NOT NULL, PRIMARY KEY (inventory_id), KEY category_part_number (category, part_number), KEY discriminator_column (discriminator_column) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE inventory_room( inventory_id INT NOT [...]
SVN Externals – how to add them
When creating a Zend Framework site, its always best to keep the Zend library as an external source. This way you can keep the branch up-to-date with the release of Zend with a simple text file. To access the externals file, navigate to the root of your site: > cd /var/www/mysite And add the external [...]
Add all new files to SVN
How to recursively add all new files to SVN > svn add –force * Saves a whole bunch of time when committing a load of new pages via the command line.
Keeping 2 drives sync’ed with rsync on Linux
I have an external USB HDD and I like to keep it synchronised with my desktop for backup reasons. I find the easiest way to do this, is to use rsync: > sudo apt-get install rsync > rsync -avu /source/ /dest/ For example: > rysnc -avu /media/externaldisk/ /home/chris/diskbackup/ Will increment copy everything (ignoring older files) from [...]
Logo for Pete Watkins
Just a quick logo knocked up for Pete:
Get rid of Apple Test Advertisment from iPhone SpringBoard
I get constantly annoyed by the test apple advert on my phone’s springboard after I’ve quit an app. But I think I worked out how to stop it: Install iFile (obviously you need a jailbroken phone to do this as its a Cydia app) Navigate to \Applications And then touch the blue arrow on the [...]
HOWTO: Rotate a video in Linux
I videoed something at the weekend on my iphone, but must’ve had the phone upside-down so the video came out that way. Fortunately there is a little program that will rotate a video for you. > sudo apt-get install mencoder Then, to rotate my video clockwise by 90 degrees: > mencoder -ovc lavc -vf rotate=1 [...]
Stopping Ubuntu opening F-Spot when I plug in my iPhone
When I installed Ubuntu, every time I plugged in my iPhone it popped up a prompt asking me what to do about the digital music/photos. After clicking “do nothing” for months I decided to let it open F-Spot to import my photos. This is all well and good, but it now pops up f-spot whenever [...]
« go back — keep looking »