<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gabriel de Kadt</title>
	<atom:link href="http://www.lazydada.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lazydada.com</link>
	<description>Personal notes on Mac based web development and design.</description>
	<lastBuildDate>Tue, 30 Aug 2011 10:47:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Remove and ignore dreamweaver dwsync.xml files from your GIT repo</title>
		<link>http://www.lazydada.com/2011-08-30/remove-and-ignore-dreamweaver-dwsync-xml-files-from-your-git-repo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remove-and-ignore-dreamweaver-dwsync-xml-files-from-your-git-repo</link>
		<comments>http://www.lazydada.com/2011-08-30/remove-and-ignore-dreamweaver-dwsync-xml-files-from-your-git-repo/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 10:40:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=954</guid>
		<description><![CDATA[git ignore dreamweaver dwsync.xml files (and other gubbins as required) Remove any files already added form the working directory. For example: $ git rm -f *dwsync.xml set up your a global git ignore file create a gitignore file in your home directory. eg: $ printf "dwsync.xml\nThumbs.db\n" &#62;&#62; ~/.gitignore using git config add this to you [...]]]></description>
			<content:encoded><![CDATA[<h3>git ignore dreamweaver dwsync.xml files (and other gubbins as required)</h3>
<ol>
<li>
<h3>Remove any files already added form the working directory. For example:</h3>
<p><code>$ git rm -f *dwsync.xml</code></li>
<li>
<h3>set up your a global git ignore file</h3>
<p>create a gitignore file in your home directory. eg:</p>
<p><code>$ printf "dwsync.xml\nThumbs.db\n" &gt;&gt; ~/.gitignore</code></p>
<p>using git config add this to you git prefs</p>
<p><code>$ git config --global core.excludesfile ~/.gitignore</code></li>
</ol>
<p>For repos that may be worked on by multiple users you should also create this file at the root of your working directory.</p>
<p>References<br />
<a href="hcodep://jqr.github.com/2009/02/03/global-git-ignore.html" target="_blank"> hcodep://jqr.github.com/2009/02/03/global-git-ignore.html</a><br />
<a href="hcodep://help.github.com/ignore-files/" target="_blank"> hcodep://help.github.com/ignore-files/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-08-30/remove-and-ignore-dreamweaver-dwsync-xml-files-from-your-git-repo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hard coding your site URL in WordPress</title>
		<link>http://www.lazydada.com/2011-07-29/hard-coding-your-site-url-in-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hard-coding-your-site-url-in-wordpress</link>
		<comments>http://www.lazydada.com/2011-07-29/hard-coding-your-site-url-in-wordpress/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 23:16:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=948</guid>
		<description><![CDATA[I discovered this handy feature on troubleshooting a login problem for a client of mine. If you swap your WP database between a development and production server at all regularly and don&#8217;t fancy editing your site URL and WordPress URL in the wp-options table each time (either directly or via the WP admin interface)&#8230; you [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered this handy feature on troubleshooting a login problem for a client of mine. </p>
<p>If you swap your WP database between a development and production server at all regularly and don&#8217;t fancy editing your site URL and WordPress URL in the  wp-options table each time (either directly or via the WP admin interface)&#8230; you can hard code it into the wp-config.php file! Tie this together with WordPress ability to keep this config file out of harms way in a directory above your WP install (ie out of your public_html directory) and you have an easy hands free file sync operation too.</p>
<p>Just add these two lines of code into wp-config.php:<br />
<code><br />
// hardcoding the domain<br />
define("WP_SITEURL","http://www.mysite.com");<br />
define("WP_HOME","http://www.mysite.com");<br />
</code></p>
<p>BTW &#8211; note the lack of trailing slashes on the URLs</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-07-29/hard-coding-your-site-url-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice WordPress article in .Net</title>
		<link>http://www.lazydada.com/2011-07-25/nice-wordpress-article-in-net/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nice-wordpress-article-in-net</link>
		<comments>http://www.lazydada.com/2011-07-25/nice-wordpress-article-in-net/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 15:48:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=945</guid>
		<description><![CDATA[Nice article about WordPress in my favourite web design and develpment magazine (issue 217  of .NET). Usual stuff but well written without either speeding or jabbering. There&#8217;s a nice overview of Custom Menus, Multisite, Custom Post Formats, Custom Post types and Custom Taxonomies. WP Custom Heaven One thing I&#8217;d never heard of before was the new [...]]]></description>
			<content:encoded><![CDATA[<p>Nice article about WordPress in my favourite <a title="dot Net magazine" href="http://www.netmagazine.com/" target="_blank">web design and develpment magazine</a> (issue 217  of .NET). Usual stuff but well written without either speeding or jabbering.</p>
<p>There&#8217;s a nice overview of Custom Menus, Multisite, Custom Post Formats, Custom Post types and Custom Taxonomies.</p>
<h4>WP Custom Heaven</h4>
<p>One thing I&#8217;d never heard of before was the new ability in WordPress 3.x to enable custom background images to any post. Just add the following to your <tt>functions.php</tt> file:</p>
<pre class="brush: php; title: ; notranslate">add_custom_background();</pre>
<p>. Look up the codex for more. Aparently this allows admin users to change background image properties (as CSS) from within the appearance menu. <a href="http://codex.wordpress.org/Function_Reference/add_custom_background">http://codex.wordpress.org/Function_Reference/add_custom_background</a>. Having not tried this &#8211; but I think its limited to a global preference per install &#8211; so of limited use to theme developers.</p>
<p>Anyway nice stuff Jeff Starr at .Net &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-07-25/nice-wordpress-article-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 101. Basic stuff: get value from URL querystring with PHP</title>
		<link>http://www.lazydada.com/2011-07-11/basic-get-value-from-url-querystring-with-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-get-value-from-url-querystring-with-php</link>
		<comments>http://www.lazydada.com/2011-07-11/basic-get-value-from-url-querystring-with-php/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 09:14:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=934</guid>
		<description><![CDATA[As I&#8217;m still an idiot when it comes to media queries and mobile devices and can pass this stuff on to other folks &#8211; but needed to give myself and the interested parties a visual representation of how different sized graphics will be delivered to different mobile devices&#8230; I was after a simple &#8216;switch&#8217; that [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m still an idiot when it comes to media queries and mobile devices and can pass this stuff on to other folks &#8211; but needed to give myself and the interested parties a visual representation of how different sized graphics will be delivered to different mobile devices&#8230; I was after a simple &#8216;switch&#8217; that would allow a single wedge of HTML to render according to a variable.</p>
<p>The example here goes along the lines of http://example.com?width=340 where the width has a few values it accepts or will default to a preset size&#8230;</p>
<p>This variable can then get passed around in the PHP file to set image dimaensions CSS etc&#8230;</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
function getUrlStringValue($urlStringName, $returnIfNotSet) {    if(isset($_GET[$urlStringName]) &amp;&amp; $_GET[$urlStringName] != &quot;&quot;)      return $_GET[$urlStringName];    else      return $returnIfNotSet;  }
$width = getUrlStringValue(&quot;width&quot;, &quot;480&quot;);

?&gt;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=&lt;?php echo $width ;?&gt;&quot; /&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-07-11/basic-get-value-from-url-querystring-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript redirect based on referrer</title>
		<link>http://www.lazydada.com/2011-06-21/javascript-redirect-based-on-referrer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=javascript-redirect-based-on-referrer</link>
		<comments>http://www.lazydada.com/2011-06-21/javascript-redirect-based-on-referrer/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 12:26:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=931</guid>
		<description><![CDATA[Basic stuff (as often the case not immediately findable). You want a simple script to redirect to a different page if te referrer is such and such. In the following example the two referral page options ( foo.html and bar.html ) are separated with the double pipe (the &#8216;or&#8217; bit)&#8230;]]></description>
			<content:encoded><![CDATA[<p>Basic stuff (as often the case not immediately findable). You want a simple script to redirect to a different page if te referrer is such and such. In the following example the two referral page options  ( foo.html and bar.html ) are separated with the double pipe (the &#8216;or&#8217; bit)&#8230; </p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
if (document.referrer == (&quot;http://example.com/foo.html&quot; || &quot;http://example.com/bar.html&quot;))
      location.href = &quot;foobar.html&quot;;
&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-06-21/javascript-redirect-based-on-referrer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS 3 pseudo-classes and attribute selectors in Internet Explorer</title>
		<link>http://www.lazydada.com/2011-05-27/css-3-pseudo-classes-and-attribute-selectors-in-internet-explorer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=css-3-pseudo-classes-and-attribute-selectors-in-internet-explorer</link>
		<comments>http://www.lazydada.com/2011-05-27/css-3-pseudo-classes-and-attribute-selectors-in-internet-explorer/#comments</comments>
		<pubDate>Fri, 27 May 2011 09:04:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=922</guid>
		<description><![CDATA[Thanks to my mate Tony I&#8217;ve been introduced to this rather delicious (and very small) jQuery plugin that adds support for, among other things the :nth-child pseudo class. If this had been around a year ago &#8216;d have avoided having to craft this php counting system for a custom WordPress loop. What&#8217;s the link already? [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to my mate <a title="Tony's tweets re his platform for illustrators" rel="colleage friend" href="http://twitter.com/#!/theartfuls" target="_blank">Tony</a> I&#8217;ve been introduced to this rather delicious (and very small) jQuery plugin that adds support for, among other things the <tt>:nth-child</tt> pseudo class. If this had been around a year ago &#8216;d have avoided having to craft this <a title="WordPress loop with x big posts in one column then a grid of y smaller posts in z columns" href="http://www.lazydada.com/2010-06-10/fancy-wordpress-loop-with-main-posts-and-then-grid-of-post-in-rows/">php counting system for a custom WordPress loop</a>.</p>
<h4>What&#8217;s the link already?<br />
Here you go Jack: <a title="pseudo classes for Internet explorer" href="http://selectivizr.com/" target="_blank">Selctivizr</a></h4>
<p>Shout out to our kid Tony and good luck to him and his latest baby &#8211; an online platform for Illustrators: <a title="online platform for Illustrators" rel="contact" href="http://www.theartfuls.com/">the artfuls </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-05-27/css-3-pseudo-classes-and-attribute-selectors-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a page ID in WordPress</title>
		<link>http://www.lazydada.com/2011-04-28/getting-a-page-id-in-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=getting-a-page-id-in-wordpress</link>
		<comments>http://www.lazydada.com/2011-04-28/getting-a-page-id-in-wordpress/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 19:39:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=918</guid>
		<description><![CDATA[Q. Want to get something in your theme to work with data from a particular page or post &#8211; but don&#8217;t know for sure what that post&#8217;s ID is? A. Try this in your functions.php file: &#8230;then you can then pass a variable about in your theme&#8217;s templates.]]></description>
			<content:encoded><![CDATA[<p>Q. Want to get something in your theme to work with data from a particular page or post &#8211; but don&#8217;t know for sure what that post&#8217;s ID is?</p>
<p>A. Try this in your functions.php file:</p>
<pre class="brush: php; title: ; notranslate">$my_id = $wpdb-&gt;get_var(&quot;SELECT ID FROM $wpdb-&gt;posts WHERE post_name = 'myPost'&quot;);</pre>
<p>&#8230;then you can then <a href="http://www.lazydada.com/2011-04-28/passing-a-variable-about-in-a-wordpress-theme/">pass a variable about</a> in your theme&#8217;s templates.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-04-28/getting-a-page-id-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing a variable about in a WordPress theme</title>
		<link>http://www.lazydada.com/2011-04-28/passing-a-variable-about-in-a-wordpress-theme/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=passing-a-variable-about-in-a-wordpress-theme</link>
		<comments>http://www.lazydada.com/2011-04-28/passing-a-variable-about-in-a-wordpress-theme/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 17:58:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=915</guid>
		<description><![CDATA[I&#8217;m used to using php variables set in included  file being used in another included file if all are included in the same document. This doesn&#8217;t work in WordPress theme parts. It&#8217;s easy to overcome though&#8230; you just need to recall the variable first&#8230; somewhere in functions.php Now i can do this somewhere in header.php]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m used to using php variables set in included  file being used in another included file if all are included in the same document. This doesn&#8217;t work in WordPress theme parts. It&#8217;s easy to overcome though&#8230; you just need to recall the variable first&#8230;</p>
<p>somewhere in functions.php</p>
<pre class="brush: php; title: ; notranslate"> $my_var = &quot;xyz&quot; </pre>
<p>Now i can do this somewhere in header.php</p>
<pre class="brush: php; title: ; notranslate">&lt;?php global $myVar ;  ?&gt;
&lt;?php echo $myVar; ?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-04-28/passing-a-variable-about-in-a-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple WordPress excerpt lengths</title>
		<link>http://www.lazydada.com/2011-04-28/multiple-wordpress-excerpt-lengths/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=multiple-wordpress-excerpt-lengths</link>
		<comments>http://www.lazydada.com/2011-04-28/multiple-wordpress-excerpt-lengths/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 17:51:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=910</guid>
		<description><![CDATA[Q. Got a theme that needs two different excerpt lengths? A. Found here: set the standard, longer excerpt as normal in the functions.php file and the override locally using this code: &#160;]]></description>
			<content:encoded><![CDATA[<p>Q. Got a theme that needs two different excerpt lengths?</p>
<p>A. Found <a href="http://wordpress.org/support/topic/possible-to-have-2-excerpt-lengths" target="_blank">here</a>: set the standard, longer excerpt as normal in the functions.php file and the override locally using this code:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php echo substr( get_the_excerpt(), 0, strrpos( substr( get_the_excerpt(), 0, 75), ' ' ) ); ?&gt;</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-04-28/multiple-wordpress-excerpt-lengths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rollback a GIT commit</title>
		<link>http://www.lazydada.com/2011-04-28/rollback-a-git-commit/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rollback-a-git-commit</link>
		<comments>http://www.lazydada.com/2011-04-28/rollback-a-git-commit/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 14:10:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web design & development]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://www.lazydada.com/?p=901</guid>
		<description><![CDATA[GIT is great, Git is good. I mostly use git to track changes (very useful to check on what I&#8217;ve  been up to when it&#8217;s late in the night!) but occasionally I need to use it to roll back to a previous commit. This is the command I always forget, and today it took me [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Version control" href="http://git-scm.com/" target="_blank">GIT</a> is great, <a title="The creator of LINUX talks about his version control system" href="http://www.youtube.com/watch?v=4XpnKHJAok8" target="_blank">Git is good</a>.</p>
<p>I mostly use git to track changes (very useful to check on what I&#8217;ve  been up to when it&#8217;s late in the night!) but occasionally I need to use it to roll back to a previous commit. This is the command I always forget, and today it took me more than one minute to find the answer (or formulate the right question) on google.</p>
<p>The answer, unsurprisingly on <a title="roll back a git commit" href="http://stackoverflow.com/questions/1616957/how-do-you-roll-back-reset-a-git-repository-to-a-particular-commit" target="_blank">stackoverflow</a>: in your [git tracked] working directory enter this terminal command:</p>
<pre class="brush: bash; title: ; notranslate">git reset --hard &lt;tag/branch/commit id&gt;</pre>
<p>Where  you replace the gubbins inside the angle brackets with the SHA ID of your commit. Find this easily using <a title="Mac GIT client" href="http://gitx.frim.nl/" target="_blank">GitX</a> or my potential new favourite GIT client on the Mac: <a title="Nice Mac GIT client" href="http://www.gittiapp.com/" target="_blank">Gitti</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lazydada.com/2011-04-28/rollback-a-git-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
