<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!-- generator="Joomla! 1.5 - Open Source Content Management" --><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
	<channel>
		<title>Nick Yeoman - Web Developer</title>
		<description>Nick Yeoman - Web Developer, who specializes in PHP, CMS, Intranet and Linux server technologies.</description>
		<link>http://www.nickyeoman.com/component/content/frontpage</link>
		<lastBuildDate>Sun, 05 Sep 2010 06:39:02 +0000</lastBuildDate>
		<generator>Joomla! 1.5 - Open Source Content Management</generator>
		<language>en-gb</language>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/NickYeoman" /><feedburner:info uri="nickyeoman" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>NickYeoman</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
			<title>HTML5 Tags in IE8</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/uNr65btFzF0/118-html5-tags-in-ie8</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/html/118-html5-tags-in-ie8</guid>
			<description>&lt;p&gt;
I'm now creating all new websites in HTML5.  As always, IE is way behind in technology.  This article explains how to get your html5 tags working just like they would in Chrome or Firefox.
&lt;/p&gt;



&lt;p&gt;
You can get HTML5 tags working in IE8 by including this JavaScript in the head.
&lt;/p&gt;

&lt;pre&gt;
&amp;lt;script&amp;gt;
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
&amp;lt;/script&amp;gt;
&lt;/pre&gt;

&lt;p&gt;So far this has covered all my needs, if you have more in depth explication I'd love to hear it.  Please leave a comment.

&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.webmonkey.com/2010/02/building_web_pages_with_html_5/"&gt;Building HTML5 Pages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/d9rHhcqqvE4uUIXT_i1-3bgdkRw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/d9rHhcqqvE4uUIXT_i1-3bgdkRw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/d9rHhcqqvE4uUIXT_i1-3bgdkRw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/d9rHhcqqvE4uUIXT_i1-3bgdkRw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/uNr65btFzF0" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Thu, 27 May 2010 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/html/118-html5-tags-in-ie8</feedburner:origLink></item>
		<item>
			<title>Random numbers</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/65mjQexXmBw/114-random-numbers</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/php/114-random-numbers</guid>
			<description>&lt;p&gt;
I hold a lot of contests where I select a random winner.  Unlike the past I don't print out all of the contestants and draw from the hat, I use a command line PHP script.
&lt;/p&gt;



&lt;p&gt;
Here is the file I use to draw random winners for my contests.
&lt;/p&gt;

&lt;pre&gt;
&amp;lt;?php
/**
* Random Draw
* v1.0
* Last Updated: Apr 1, 2010
* URL: http://www.nickyeoman.com/blog/php/114-random-numbers
*
* Each contastant must have a number (array starts at 1)
**/

//Get number of entires
$contestants = $argv[1];
$winner = rand_best(1,$contestants);

$print = &amp;lt;&amp;lt;&amp;lt;EOTXT
And the winner is entry#: $winner \n
EOTXT;

echo $print;

/**
* Function from stack overflow
* http://stackoverflow.com/questions/1041509/php-best-random-numbers
**/
function rand_best($min, $max) {
    $generated = array();
    for ($i = 0; $i &amp;lt; 100; $i++) {
        $generated[] = mt_rand($min, $max);
    }
    shuffle($generated);
    $position = mt_rand(0, 99);
    return $generated[$position];
}

?&amp;gt;

&lt;/pre&gt;

&lt;p&gt;
All you need to do to run this is open the command line, navigate to the directory it is stored and run the command:
&lt;/p&gt;
&lt;pre&gt;
php name_of_file.php 100
&lt;/pre&gt;
&lt;p&gt;
where 100 is the number of contestants.
&lt;/p&gt;


&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://stackoverflow.com/questions/1041509/php-best-random-numbers"&gt;Stack Overflow - "Best Random Numbers"&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.random.org/"&gt;True Random Numbers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DqqTO3ce2IlSu0mztoy6QC_gxw4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DqqTO3ce2IlSu0mztoy6QC_gxw4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DqqTO3ce2IlSu0mztoy6QC_gxw4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DqqTO3ce2IlSu0mztoy6QC_gxw4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/65mjQexXmBw" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Tue, 06 Apr 2010 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/php/114-random-numbers</feedburner:origLink></item>
		<item>
			<title>Split Files Into Chunks</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/fMl8CxrxvWI/113-split-files-into-chunks</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/system-administration/113-split-files-into-chunks</guid>
			<description>&lt;p&gt;
Split is a really easy Linux command you can use to split large files into smaller chunks.
&lt;/p&gt;



&lt;p&gt;
Split is quick and painless to use, this is how you split a 800MB file into 100MB chunks with the prefix splt_:
&lt;/p&gt;

&lt;pre&gt;
split -b 100m fileName.avi splt_
&lt;/pre&gt;

&lt;p&gt;This will result in a number of files named splt_aa, splt_ab, splt_ac&lt;/p&gt;

&lt;p&gt;You can put the pieces back together with cat&lt;/p&gt;

&lt;pre&gt;cat splt_* &amp;gt; fileName.avi&lt;/pre&gt;

&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?split"&gt;Split Man Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bashcurescancer.com/10-linux-commands-youve-never-used.html"&gt;10 Linux commands you've never used&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.computerhope.com/unix/usplit.htm"&gt;Split Help&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.mynitor.com/2010/01/04/the-linux-split-command/"&gt;The linux split command&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9hx7k_a6Mnasqb3KCD4GlAjyYw0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9hx7k_a6Mnasqb3KCD4GlAjyYw0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9hx7k_a6Mnasqb3KCD4GlAjyYw0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9hx7k_a6Mnasqb3KCD4GlAjyYw0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/fMl8CxrxvWI" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Mon, 05 Apr 2010 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/system-administration/113-split-files-into-chunks</feedburner:origLink></item>
		<item>
			<title>Runaway Process</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/NhuqNBH3VBA/112-runaway-process</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/mysql/112-runaway-process</guid>
			<description>&lt;p&gt;
I find it really annoying when my mysql processes run away.  This doesn't happen very often so I can never remember the command.
&lt;/p&gt;



&lt;p&gt;
Here are the commands to stop a run away process.
&lt;/p&gt;

&lt;pre&gt;SHOW PROCESSLIST;&lt;/pre&gt;

&lt;p&gt;will show you the list of running processes, then to kill the process run&lt;/p&gt;

&lt;pre&gt;
KILL thread_id;
&lt;/pre&gt;


&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/show-processlist.html"&gt;Mysql.com - Show Processlist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/kill.html"&gt;Mysql.com - Kill&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://mojocode.com/content/killing-mysql-runaway-query"&gt;Killing Mysql Runaway Query - mojocode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vRGt9q8UXegLLYZQmd53pXXQ644/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vRGt9q8UXegLLYZQmd53pXXQ644/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vRGt9q8UXegLLYZQmd53pXXQ644/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vRGt9q8UXegLLYZQmd53pXXQ644/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/NhuqNBH3VBA" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Mon, 21 Dec 2009 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/mysql/112-runaway-process</feedburner:origLink></item>
		<item>
			<title>Install VMWare Tools Ubuntu Server</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/FLZMg9wE460/111-vmware-tools-ubuntu-server</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/desktop-development/111-vmware-tools-ubuntu-server</guid>
			<description>&lt;p&gt;
I don't often install Ubuntu server on a Virtual Machine (VM) so I've documented the process here.  Usually you can just click "install VMWare tools" and VMWare will complete the process automatically.
&lt;/p&gt;



&lt;p&gt;
Note: I used VMWare workstation 7.0 and Ubuntu 9.10.  Once you have Ubuntu Server installed run these commands.
&lt;/p&gt;
&lt;pre&gt;
#Change to super user
sudo su

#Update your sources
apt-get update

#Upgrade your installed packages and force kernel upgrade
apt-get dist-upgrade
&lt;/pre&gt;

&lt;p&gt;Now reboot&lt;/p&gt;
&lt;pre&gt;
#back to super user
sudo su

#Update your kernel:
apt-get install linux-headers-server build-essential
&lt;/pre&gt;

&lt;p&gt;Now you are ready to install VMWare tools.&lt;/p&gt;

&lt;pre&gt;
#Mount the VMWare Tools CD ISO
mount /cdrom

#Copy VMware Tools
cp /cdrom/VmwareTools-x.x.x-xxxxx.tar.gz /tmp

#Go tmp
cd /tmp

#Extract
tar -zxf VmwareTools-x.x.x-xxxxx.tar.gz

#Change to extracted directory
cd vmware-tools-distrib

#Start the installer
./vmware-install.pl
&lt;/pre&gt;

&lt;p&gt;I used all of the default settings and it works great for me. After a reboot you can use tools such as Shared folders (/mnt/hgfs/).&lt;/p&gt;

&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.gorillapond.com/2006/07/31/install-vmware-tools-on-ubuntu/"&gt;Gorillapond&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ubuntu-tutorials.com/2008/06/07/how-to-install-vmware-tools-on-ubuntu-804-guests/"&gt;Ubuntu tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://communities.vmware.com/thread/215289"&gt;VMWare forum&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KYE6ThtqW6yeIqAI--Fk3-ZBmt0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KYE6ThtqW6yeIqAI--Fk3-ZBmt0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KYE6ThtqW6yeIqAI--Fk3-ZBmt0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KYE6ThtqW6yeIqAI--Fk3-ZBmt0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/FLZMg9wE460" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Mon, 07 Dec 2009 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/desktop-development/111-vmware-tools-ubuntu-server</feedburner:origLink></item>
		<item>
			<title>Reset MySQL Root Password</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/6wN8mY1Xc5g/107-reset-mysql-root-password</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/mysql/107-reset-mysql-root-password</guid>
			<description>&lt;p&gt;
Have you forgotten your MySQL root password? I must admit I've been guilty of this a few times.  Also helpful if you are working on a project where the previous developer or server admin has vanished. This article tells you how to reset your password.
&lt;/p&gt;



&lt;p&gt;
You will need root access to the Linux box running the database.
&lt;/p&gt;  

&lt;p&gt;
Here are the steps to recover your MySQL password.
&lt;/p&gt;

&lt;h2&gt;Step 1&lt;/h2&gt;
&lt;p&gt;Log in as root on the Linux server.&lt;/p&gt;
&lt;pre&gt;
sudo su
&lt;/pre&gt;

&lt;h2&gt;Step 2&lt;/h2&gt;
&lt;p&gt;Create a file named â€œmysql-initâ€ in your /root directory. &lt;/p&gt;
&lt;pre&gt;
touch /root/mysql-init
&lt;/pre&gt;

&lt;h2&gt;Step 3&lt;/h2&gt;
&lt;p&gt;Place the following in your mysql-init file, be sure to change "myNEWpassword" to your new password:&lt;/p&gt;

&lt;pre&gt;
UPDATE mysql.user SET Password=PASSWORD('myNEWpassword') WHERE User='root';
FLUSH PRIVILEGES;
&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;Note: ensure UPDATE and FLUSH are on their own lines.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Step 4&lt;/h2&gt;

&lt;p&gt;Turn off your mysql service.&lt;/p&gt;

&lt;pre&gt;
killall mysqld
&lt;/pre&gt;

&lt;h2&gt;Step 5&lt;/h2&gt;

&lt;p&gt;Run your mysql-init&lt;/p&gt;

&lt;pre&gt;
mysqld_safe --user=mysql --init-file=/root/mysql-init &amp;
&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;Note: Make sure the user is set to your mysql user.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Step 6&lt;/h2&gt;

&lt;p&gt;After the server has started successfully, delete your mysql-init for security.&lt;/p&gt;

&lt;pre&gt;
rm /root/mysql-init
&lt;/pre&gt;


&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://computersight.com/operating-systems/linux/reset-mysql-root-password/"&gt;Reset MySQL Root password&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ubuntu.flowconsult.at/en/mysql-set-change-reset-root-password/"&gt;Set / Change / Reset the MySQL root password on Ubuntu Linux&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/S8AoKyaVLVk9Pd_lBalEoS9L6ss/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/S8AoKyaVLVk9Pd_lBalEoS9L6ss/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/S8AoKyaVLVk9Pd_lBalEoS9L6ss/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/S8AoKyaVLVk9Pd_lBalEoS9L6ss/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/6wN8mY1Xc5g" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Mon, 30 Nov 2009 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/mysql/107-reset-mysql-root-password</feedburner:origLink></item>
		<item>
			<title>Rsync</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/XGaPfA8Ut94/74-rsync</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/system-administration/74-rsync</guid>
			<description>&lt;p&gt;
This article is my reference for everything to do with Rsync.  I primarily use Rsync for backups and moving servers.
&lt;/p&gt;



&lt;p&gt;
Rsync is the best way (that I'm currently aware of) to transfer files. Only use Rsync when you need to copy files more than once.  Here are some examples of how Rsync may be used.
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backing up from server to server using ssh&lt;/li&gt;
&lt;li&gt;Backing up from drive to drive on the same server&lt;/li&gt;
&lt;li&gt;Moving from one server to the other (first for a copy then second to move/delete the files at launch)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Nick's Rsync examples&lt;/h2&gt;
&lt;h3&gt;Rsync through ssh&lt;/h3&gt;
&lt;pre&gt;
#synchronize backups to the local machine
rsync -e ssh -avzu -c -C root@192.168.0.10:/Store/Backups/ /Backups/ServerTen/
&lt;/pre&gt;

&lt;p&gt;Do you have any Rsync tricks you use? post them to the comments section.&lt;/p&gt;

&lt;h2&gt;Rsync Parameters&lt;/h2&gt;
&lt;p&gt;I wanted a quick reference for Rsync parameters so I didn't have to weed through the &lt;a href="http://www.samba.org/ftp/rsync/rsync.html"&gt;man pages&lt;/a&gt;. Here are my most used parameters:&lt;/p&gt;
&lt;pre&gt;
 -q, --quiet                 suppress non-error messages
 -c, --checksum              skip based on checksum, not mod-time &amp; size
 -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
 -r, --recursive             recurse into directories
 -u, --update                skip files that are newer on the receiver
 -d, --dirs                  transfer directories without recursing
 -l, --links                 copy symlinks as symlinks
 -L, --copy-links            transform symlink into referent file/dir
 -k, --copy-dirlinks         transform symlink to dir into referent dir
 -K, --keep-dirlinks         treat symlinked dir on receiver as dir
 -H, --hard-links            preserve hard links
 -p, --perms                 preserve permissions
 -E, --executability         preserve executability
     --chmod=CHMOD           affect file and/or directory permissions
 -A, --acls                  preserve ACLs (implies -p)
 -X, --xattrs                preserve extended attributes
 -o, --owner                 preserve owner (super-user only)
 -g, --group                 preserve group
 -t, --times                 preserve modification times
 -n, --dry-run               perform a trial run with no changes made
 -W, --whole-file            copy files whole (w/o delta-xfer algorithm)
 -x, --one-file-system       don't cross filesystem boundaries
 -B, --block-size=SIZE       force a fixed checksum block-size
 -e, --rsh=COMMAND           specify the remote shell to use
     --rsync-path=PROGRAM    specify the rsync to run on remote machine
     --delete-before         receiver deletes before transfer (default)
 -I, --ignore-times          don't skip files that match size and time
 -z, --compress              compress file data during the transfer
 -h, --human-readable        output numbers in a human-readable format
&lt;/pre&gt;


&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.samba.org/rsync/"&gt;Rsync Official page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.samba.org/ftp/rsync/rsync.html"&gt;Rsync Man Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.fredshack.com/docs/rsync.html"&gt;Rsync Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ry5v5pYBWPvttWdMGcg9J61n1vQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ry5v5pYBWPvttWdMGcg9J61n1vQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ry5v5pYBWPvttWdMGcg9J61n1vQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ry5v5pYBWPvttWdMGcg9J61n1vQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/XGaPfA8Ut94" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Mon, 23 Nov 2009 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/system-administration/74-rsync</feedburner:origLink></item>
		<item>
			<title>MySQL INSERT From A PHP Array</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/R1DLorq7ssM/95-php-mysql-insert-from-array</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/php/95-php-mysql-insert-from-array</guid>
			<description>&lt;!--
* Final Check over
--&gt;

&lt;p&gt;
I'm hooked on using CodeIgniter which uses an active record class.  This is bad because when I work on a non CodeIgniter project the work is not done for me.  This article explains the PHP function I wrote which takes a Associative array and converts it into a mysql INSERT statement.
&lt;/p&gt;



&lt;p&gt;
I just wrote this function and I'm looking for your suggestions.  If you have an idea of how I could make this, quicker faster or more user friendly please leave a comment in my comments section.
&lt;/p&gt;

&lt;pre&gt;
/**
*	Creates an sql string from an associate array
*	$table in the db table name
*	$array is the array
*	$insert is optional.  allows a user to use an update
*	V1.0
*	Last Updated Oct 4. 2009
**/
function _arrayToSql($table, $array, $insert = "INSERT INTO") {

	//Check if user wants to insert or update
	if ($insert != "UPDATE") {
		$insert = "INSERT INTO";
	}

	$columns = array();
	$data = array();
	
	foreach ( $array as $key =&gt; $value) {
		$columns[] = $key;
		if ($value != "") {
			$data[] = "'" . $value . "'";
		} else {
			$data[] = "NULL";
		}
                
		//TODO: ensure no commas are in the values
	}
            
	$cols = implode(",",$columns);
	$values = implode(",",$data);

$sql = &amp;lt;&amp;lt;&amp;lt;EOSQL
	$insert `$table`
	($cols)
	VALUES
	($values)
EOSQL;
      return $sql;

}
//End _arrayToSql()
&lt;/pre&gt;

&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/update.html"&gt;MySQL Update&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.1/en/insert.html"&gt;MySQL Insert&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://codeigniter.com/user_guide/database/active_record.html"&gt;CodeIgniter Active Record&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N-uFe-ySk3NVLVbHjSD0cHS7yO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N-uFe-ySk3NVLVbHjSD0cHS7yO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N-uFe-ySk3NVLVbHjSD0cHS7yO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N-uFe-ySk3NVLVbHjSD0cHS7yO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/R1DLorq7ssM" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Mon, 26 Oct 2009 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/php/95-php-mysql-insert-from-array</feedburner:origLink></item>
		<item>
			<title>Metatag Keywords</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/Jp53FAlNgRQ/99-metatag-keywords</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/google/99-metatag-keywords</guid>
			<description>&lt;p&gt;
Is your SEO person telling you, your keywords metatag matters?  Well I'm sorry to say metatag keywords do not effect your search engine ranking in any way.
&lt;/p&gt;



&lt;p&gt;
A metatag is placed in the &amp;lt;head&amp;gt; html tag of a web page and looks like this:
&lt;/p&gt;
&lt;pre&gt;
&amp;lt;meta name="keywords" content="yeoman,nick,web design" /&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
Google completely ignores the above meta tag in its core search.  Matt Cutts has a great video explaining why Google does this.
&lt;/p&gt;
&lt;div class="youtube"&gt;
&lt;object width="480" height="292"&gt;&lt;param name="movie" value="http://www.youtube.com/v/jK7IPbnmvVU&amp;hl=en&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/jK7IPbnmvVU&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="292"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;p&gt;
Matt Cutts doesn't talk about why we would use the keywords metatag.  One reason is for an internal search.  Using the keywords metatag allows me to target certain articles for my search results, helping my users find better results.  This creates a better user experience. 
&lt;/p&gt;

&lt;h2&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Meta_element"&gt;Wikipeida Meta - Element&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.mattcutts.com/blog/keywords-meta-tag-in-web-search/"&gt;Matt Cutts - How Google uses meta keywords&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2CGPjEm2lIdnaz5yo2h9jhhYYmc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2CGPjEm2lIdnaz5yo2h9jhhYYmc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2CGPjEm2lIdnaz5yo2h9jhhYYmc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2CGPjEm2lIdnaz5yo2h9jhhYYmc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/Jp53FAlNgRQ" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Mon, 19 Oct 2009 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/google/99-metatag-keywords</feedburner:origLink></item>
		<item>
			<title>PHP Sessions</title>
			<link>http://feedproxy.google.com/~r/NickYeoman/~3/z9IA-u5FAu4/28-php-sessions</link>
			<guid isPermaLink="false">http://www.nickyeoman.com/blog/php/28-php-sessions</guid>
			<description>&lt;!--
* You need to get into more detail and list more gotchas
* Also need references
--&gt;
&lt;p&gt;This is a brief introduction to PHP sessions. Creating sessions are very easy! Frameworks and CMSes usually have a built in class to handle PHP sessions, but today I was working on a project which didn't have such a class.  Also this is a good article if you are just learning PHP.  I actually wrote this article back in 2005 and I'm now just getting to posting it.
&lt;/p&gt;



&lt;p&gt;
Sessions allow you to set variables in one script and access them from another. To create a session you can use the Session_start function.
&lt;/p&gt;

&lt;p&gt;
When working with sessions always place the following function on the first line of your script:
&lt;/p&gt;

&lt;pre&gt;
&amp;lt;?php session_start(); ?&amp;gt;
&lt;/pre&gt;

&lt;h2&gt;Variables&lt;/h2&gt;

&lt;p&gt;You can assign variables to a session by using the $_SESSION global variable.&lt;/p&gt;

&lt;pre&gt;
$_SESSION['test'] = 'hello';
$value = $_SESSION['test'];
echo "The value of the session variable 'test' is ($value)";
&lt;/pre&gt;

&lt;h2&gt;Access saved data&lt;/h2&gt;
&lt;p&gt;
The session_decode() function allows you to replace current session with encoded session data.
&lt;/p&gt;

&lt;h2&gt;Code Igniter&lt;/h2&gt;
&lt;p&gt;
As I now do most of my work in Code Igniter I'd like to mention that Code Igniter's session class &lt;strong&gt;does not utilize native PHP sessions&lt;/strong&gt;.  Read more about &lt;a href="http://codeigniter.com/user_guide/libraries/sessions.html"&gt;CodeIgniter's Session Class&lt;/a&gt;.
&lt;/p&gt;

&lt;h2&gt;Reference&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://us3.php.net/manual/en/book.session.php"&gt;PHP.net - Session Handling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://codeigniter.com/user_guide/libraries/sessions.html"&gt;CodeIgniter's Session Class&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4CQP72uKfFCq7nB201DH19GAAgU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4CQP72uKfFCq7nB201DH19GAAgU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4CQP72uKfFCq7nB201DH19GAAgU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4CQP72uKfFCq7nB201DH19GAAgU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NickYeoman/~4/z9IA-u5FAu4" height="1" width="1"/&gt;</description>
			<author>publisher@NickYeoman.com (Nick Yeoman)</author>
			<category>frontpage</category>
			<pubDate>Mon, 12 Oct 2009 08:00:00 +0000</pubDate>
		<feedburner:origLink>http://www.nickyeoman.com/blog/php/28-php-sessions</feedburner:origLink></item>
	</channel>
</rss>
