<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Mark Gandolfo - Articles</title>
    <description>Articles regarding to the markgandolfo</description>
    <link>http://markgandolfo.com.au/articles.rss</link>
    <item>
      <title>CakePHP Migrations</title>
      <description>&lt;h4&gt;Installation of CakePHP Migrations&lt;/h4&gt;

&lt;p&gt;This is a quick how to use CakePHP Migrations. First download the three packages &lt;a href="http://github.com/joelmoss/cakephp-db-migrations/tree/master/README.md#"&gt;Migrations&lt;/a&gt; &lt;a href="http://pear.php.net/package/PEAR"&gt;Pear Core&lt;/a&gt; and &lt;a href="http://pear.php.net/package/MDB2"&gt;MDB2&lt;/a&gt;. Put the migrations vendor plugin into the cake/vendor directory. Place the two Pear packages into your php include directory, and/or modify your php.ini to reflect the location of installation. &lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;h4&gt;How To Use&lt;/h4&gt;

&lt;p&gt;In the cake/console directory there is a ./cake or cake.bat file (depending on operating system)&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;h5&gt;Generating a Migration&lt;/h5&gt;

&lt;p&gt;to generate a migration file for a User model simply write&lt;br /&gt;
&lt;code&gt;cake.bat migrate g user&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
This will create a file in app/config/migrations/ named timestamp&lt;em&gt;user e.g. 1226324252&lt;/em&gt;user.yml&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
# migration YAML file&lt;br /&gt;
UP:&lt;br /&gt;
  create_table:&lt;br /&gt;
    table_name:&lt;br /&gt;
      name:&lt;br /&gt;
      description: text&lt;br /&gt;
      count: integer&lt;br /&gt;
      is_active: boolean&lt;br /&gt;
DOWN:&lt;br /&gt;
  drop&lt;em&gt;table: table&lt;/em&gt;name&lt;br /&gt;
&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
Please Note: Make sure you remove the text "table_name" and replace it with the table name you generated the file for, e.g. "user"
Also ensure all fields have a type.&lt;br /&gt; 
&lt;br /&gt;&lt;/p&gt;

&lt;h4&gt;Processing Migrations&lt;/h4&gt;

&lt;p&gt;To get the database up to the latest migration file
&lt;code&gt;cake.bat migrate all&lt;/code&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 20 Nov 2008 13:33:30 +1000</pubDate>
      <link>http://markgandolfo.com.au/articles/34</link>
    </item>
    <item>
      <title>firefox double page request</title>
      <description>&lt;p&gt;For the life of me I couldn't work out why every time I clicked on a new advert in my new classifieds section I'm developing it would count as two clicks in firefox. &lt;br /&gt;&lt;br /&gt;
After a bit of research I've found that if firefox finds an empty img src, i.e. img src="", then it reloads the page hoping it'll automatically appear.&lt;br /&gt;&lt;br /&gt; &lt;/p&gt;

&lt;p&gt;I wonder why the moz devs decided this was a smart idea, is this part of the w3c? Anyway, to resolve, simply remove all of the empty src tags. &lt;/p&gt;</description>
      <pubDate>Sun, 06 Jul 2008 00:08:43 +1000</pubDate>
      <link>http://markgandolfo.com.au/articles/33</link>
    </item>
    <item>
      <title>PHP5 with GD on leopard</title>
      <description>&lt;p&gt;Crazy! I have to say I miss apt-get! But ohh well. I assume you have ports installed.. &lt;br /&gt;
&lt;br /&gt;
Install GD2&lt;br /&gt;
&lt;code&gt;sudo port install gd2&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now we want to install entropy php5&lt;br /&gt;
&lt;code&gt;curl -O http://www2.entropy.ch/download/php5-5.2.5-6-beta.tar.gz&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;tar -xzf php5-*-beta.tar.gz&lt;/code&gt; &lt;br /&gt;
&lt;code&gt;sudo mv php5 /usr/local/&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;sudo ln -sf /usr/local/php5/entropy-php.conf /etc/apache2/other/+entropy-php.conf&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
At this point go into the httpd.conf file and comment out the php5 LoadModule line. &lt;br /&gt;
&lt;code&gt;sudo apachectl restart&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
you can then php -i to see we have GD, Imap, etc. etc. installed!&lt;/p&gt;</description>
      <pubDate>Sat, 28 Jun 2008 23:35:42 +1000</pubDate>
      <link>http://markgandolfo.com.au/articles/32</link>
    </item>
    <item>
      <title>How To Get VirtualBox Working With Kernel 2.6.24.18</title>
      <description>&lt;p&gt;So I upgraded to the latest kernel and virtualisation broke. I've come to expect this after having to spend countless hours with vmware. Luckily virtual box is simple to fix and doesn't require hours in front of a pc.&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;
sudo apt-get install virtualbox-ose-source&lt;br /&gt;
sudo m-a update&lt;br /&gt;
sudo m-a prepare&lt;br /&gt;
sudo m-a a-i virtualbox-ose&lt;br /&gt;
sudo /etc/init.d/vboxdrv restart
&lt;/code&gt;
&lt;br /&gt;&lt;br /&gt;
Once you've done that go through the menu bar and start virtualbox, and you'll see it no longer complains about the kernel number and just starts!
&lt;br /&gt;
Could life be any simpler?&lt;/p&gt;</description>
      <pubDate>Sun, 08 Jun 2008 12:21:11 +1000</pubDate>
      <link>http://markgandolfo.com.au/articles/31</link>
    </item>
    <item>
      <title>Mac Book Pro</title>
      <description>&lt;p&gt;I was tossing up for a while on getting an ultra portable for the train. I couldn't find anything I really liked, or supported a linux operating system. So I decided to get a mac. My mac book pro will land in around 14 days. Its an entry level mac book pro with 4gb of ram and the faster 200gb hdd. &lt;br /&gt;&lt;br /&gt;
It should be a monster! Hopefull its practical enough to use on a train.&lt;/p&gt;</description>
      <pubDate>Sat, 31 May 2008 22:51:21 +1000</pubDate>
      <link>http://markgandolfo.com.au/articles/30</link>
    </item>
  </channel>
</rss>
