<?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>Carbon Silk &#187; Development</title>
	<atom:link href="http://www.carbonsilk.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.carbonsilk.com</link>
	<description>Developing Ideas by James Broad</description>
	<lastBuildDate>Thu, 13 May 2010 05:17:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Dom Dash &#8211; latest web application</title>
		<link>http://www.carbonsilk.com/development/domdash-domain-portfolio/</link>
		<comments>http://www.carbonsilk.com/development/domdash-domain-portfolio/#comments</comments>
		<pubDate>Thu, 13 May 2010 05:17:52 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[webapp]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=227</guid>
		<description><![CDATA[I have recently released domdash.com an application to help those that have a growing domain portfolio keep on top of their status. This was a personal itch that I needed to scratch with a domain acquisition almost every couple of months and a new project being released almost every quarter, things were getting a little [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://domdash.com" title="DomDash.com by James Broad"><img src="http://farm5.static.flickr.com/4054/4559902428_a6895c3ecb.jpg" width="500" height="500" alt="DomDash.com" /></a></p>
<p class="clear">I have recently released <a href="http://domdash.com">domdash.com</a> an application to help those that have a growing domain portfolio keep on top of their status. This was a personal itch that I needed to scratch with a domain acquisition almost every couple of months and a new project being released almost every quarter, things were getting a little hard to keep atop of.</p>
<p>One of my issues was that I have domains that sit on a mixture of hosts and domain name providers, so there was not one central tool to let me get information about my portfolio.</p>
<p>I paid particular attention to simplicity and usability when creating this application, constantly asking &#8220;does this feature add value&#8221;? With that mentality I dropped a couple of features which was hard discarding the time spent working on them but worth it for streamlining the end result. I intend on adding or refining features as I feel they fit the purpose of the application.</p>
<p>The most exciting aspect of this project was working with <a href="http://codeigniter.com/news/">CodeIgniter 2</a>, an <a href="http://en.wikipedia.org/wiki/Object-relational_mapping"><acronym title="Object-relational mapping">ORM</acronym></a> system and moving to a dedicated and affordable slice host <a href="http://www.linode.com/?r=d3905c2591b1dc6ca7a4734520f00b73f6946591">Linode</a> who are cheaper than the better known <a href="http://www.slicehost.com/">Slicehost</a> and seemed to have a pretty good reputation. So far Linode have been great, they have comprehensive <a href="http://library.linode.com/">documentation</a> on getting applications and services configured on your distribution and this was how easy it was to get up and running:</p>
<p><a href="http://twitter.com/kulor/status/12903252621">http://twitter.com/kulor/status/12903252621</a></p>
<blockquote><p>just set up an Ubuntu LAMP stack from scratch on my lunch break on linode.com (including signup)</p></blockquote>
<p>Anyway, I hope you enjoy this application, if you have feedback, feel free to click on the feedback link on <a href="http://domdash.com">domdash.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/domdash-domain-portfolio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert a series of images to a movie</title>
		<link>http://www.carbonsilk.com/development/images-to-movie/</link>
		<comments>http://www.carbonsilk.com/development/images-to-movie/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 01:25:57 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[timelapse]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=203</guid>
		<description><![CDATA[I have talked in the past about how to get a fully working time lapse system on a Mac using a webcam and some command line scripting. That was great but could do with some tweaks to get a more elegant solution which I attempted to reach here. I wanted to get more use out [...]]]></description>
			<content:encoded><![CDATA[<p><object type="application/x-shockwave-flash" width="550" height="309" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="flashvars" value="intl_lang=en-us&#038;photo_secret=163e39a9dd&#038;photo_id=4010869516"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&#038;photo_secret=163e39a9dd&#038;photo_id=4010869516" height="309" width="550"></embed></object></p>
<p>I have talked in the past about how to get a <a href="http://www.carbonsilk.com/development/timelapse-video-mac/">fully working time lapse system on a Mac</a> using a webcam and some command line scripting. That was great but could do with some tweaks to get a more elegant solution which I attempted to reach here.</p>
<p>I wanted to get more use out of my digital SLR camera so I set my camera up on a tripod, connected it up to an intervalometer (my mac) and gained a bunch of files that needed to be processed and turned into a movie. I created the following script to turn my images into a movie.</p>
<p>This script will run on any unix like environment with a bash shell and uses <code>ffmpeg</code> so make sure you have it installed on your *nix machine.</p>
<ol>
<li>Download <a href="http://github.com/kulor/images2movie/blob/master/images2movie">images2movie</a></li>
<li>Change the permissions to allow the script to be executed <code>chmod a+x images2movie</code></li>
<li>Copy file to /usr/bin/ <code>sudo cp images2movie /usr/bin/</code></li>
<li>Run by <code>images2movie &lt;directory&gt; 30</code></li>
</ol>
<p>If it all goes well, you should see the following output:</p>
<pre>
Movie generated: timelapse.mov
</pre>
<p>Some more work could be done to resize images in advance to ensure that ffmpeg doesn&#8217;t choke on the image sizes but I will save that for another time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/images-to-movie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amber &#8211; Mac Terminal theme</title>
		<link>http://www.carbonsilk.com/development/amber-mac-terminal-theme/</link>
		<comments>http://www.carbonsilk.com/development/amber-mac-terminal-theme/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 00:46:50 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=195</guid>
		<description><![CDATA[I created a terminal theme with a retro look of soft amber tones. I find this really nice to work with and have been using for a couple of months now. Download or fork it on Github. To use: download the amber.terminal file to your computer, open up Terminal.app, go to the preferences, settings tab, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.carbonsilk.com/wp-content/uploads/2009/09/amber.jpg" alt="amber theme screenshot" title="amber theme screenshot" width="529" height="367" class="alignnone size-full wp-image-196" /></p>
<p class="clear">I created a terminal theme with a retro look of soft amber tones. I find this really nice to work with and have been using for a couple of months now. Download or fork it on <a href="http://github.com/kulor/Amber-Theme/tree/master">Github</a>.</p>
<p>To use: download the <a href="http://github.com/kulor/Amber-Theme/blob/dbde5f573913e5c2282c94ed405943357cc32061/amber.terminal">amber.terminal</a> file to your computer, open up Terminal.app, go to the preferences, settings tab, then under the list of themes, click on the settings button and click import, now choose the amber.terminal file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/amber-mac-terminal-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing your first shell script</title>
		<link>http://www.carbonsilk.com/development/writing-your-first-shell-script/</link>
		<comments>http://www.carbonsilk.com/development/writing-your-first-shell-script/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 13:32:26 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=181</guid>
		<description><![CDATA[Shell scripts are a simple way of completing (repetitive) tasks on the command line, much like many programming languages will be used. You will see ~ something &#8212; ignore the &#8216;~&#8217; this is to signify that it is a command entered onto the command line itself. Writing the code ~ vi helloworld.sh #!/bin/bash # My [...]]]></description>
			<content:encoded><![CDATA[<div><a href="http://www.flickr.com/photos/hindesite/37052873/"><img src="http://farm1.static.flickr.com/33/37052873_2d8bfe13ba_d.jpg" alt="Shell"/></a></div>
<p class="clear">Shell scripts are a simple way of completing (repetitive) tasks on the command line, much like many programming languages will be used. You will see <code>~ something</code> &#8212; ignore the &#8216;~&#8217; this is to signify that it is a command entered onto the command line itself.</p>
<h3>Writing the code</h3>
<p><code>~ vi helloworld.sh</code></p>
<pre>
#!/bin/bash
# My first script
MESSAGE="Hello World!"
echo $MESSAGE
</pre>
<p>Here we have just entered a really simple example of using variables and returning the value.</p>
<h3>Setting the permissions</h3>
<p>We need to set permission to allow the script to be executed, this is needed to be done on all unix environments for something to be run</p>
<p><code>~ chmod +x helloworld.sh</code></p>
<h3>Running the script</h3>
<p><code>~ sh helloworld.sh</code></p>
<pre>Hello World!</pre>
<p>Now you should have the response &#8220;Hello World!&#8221; from running this script.</p>
<h3>Going more advanced</h3>
<p>Lets explore some of the basic options we have to play with in the shell by example.</p>
<h4>Loop test</h4>
<p><code>~ vi looptest.sh</code></p>
<pre>
#!/bin/bash
# My first loop
FILETYPES="xml html css js"
for TYPE in $FILETYPES
    do
        echo 'Looking for' $TYPE 'files'
        find . -name '*'$TYPE
    done
</pre>
<p>Now set the correct permissions and run the script</p>
<p><code>~ chmod +x looptest.sh</code><br />
<code>~ sh looptest.sh</code></p>
<pre>
Looking for xml files
./somefile.xml
Looking for html files
./somefile.html
Looking for css files
./somefile.css
Looking for js files
./somefile.js
</pre>
<h4>If conditional test</h4>
<p><code>~ vi iftest.sh</code></p>
<pre>
#!/bin/bash
# If the file does not exist, make it
FILE='test'
if [ ! -f $FILE ] ; then
    mkdir -p $FILE
fi
ls -las $FILE
</pre>
<p>Now set the correct permissions and run the script</p>
<p><code>~ chmod +x iftest.sh</code><br />
<code>~ sh iftest.sh</code></p>
<p>Hopefully this is enough to help you on your way to making more use of the powers of Unix&#8230;</p>
<h3>Further reading</h3>
<p><a href="http://www.gnu.org/software/bash/manual/html_node/index.html">Bash Manual</a><br />
<a href="http://blog.emson.co.uk/2009/06/18-useful-bash-scripts-for-web-developers/">Useful bash one liner scripts</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/writing-your-first-shell-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Making a time lapse video on Mac</title>
		<link>http://www.carbonsilk.com/development/timelapse-video-mac/</link>
		<comments>http://www.carbonsilk.com/development/timelapse-video-mac/#comments</comments>
		<pubDate>Fri, 01 May 2009 12:42:20 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[me]]></category>
		<category><![CDATA[timelapse]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=122</guid>
		<description><![CDATA[Me on a time lapse from James Broad on Vimeo. This video is what you can create (that or something similar) by following these steps on your Mac. Step 1 Download &#38; install a command line webcam capture utility, we will be using isightcapture http://www.macupdate.com/info.php/id/18598 Open the DMG and extract the binary to /usr/bin/ sudo [...]]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=4426507&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=4426507&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/4426507">Me on a time lapse</a> from <a href="http://vimeo.com/kulor">James Broad</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>This video is what you can create (that or something similar) by following these steps on your Mac.</p>
<h3>Step 1</h3>
<p>Download &amp; install a command line webcam capture utility, we will be using isightcapture<br />
<a href="http://www.macupdate.com/info.php/id/18598">http://www.macupdate.com/info.php/id/18598</a><br />
Open the DMG and extract the binary to <code>/usr/bin/</code><br />
<code>sudo cp /Volumes/isightcapture1_1/isightcapture /usr/bin/</code></p>
<h3>Step 2</h3>
<p>Set up new directory to work in.<br />
Lets use ~/captures/<br />
<code>cd ~</code><br />
<code>mkdir captures</code><br />
<code>mkdir captures/scripts</code><br />
<code>mkdir captures/series</code></p>
<h3>Step 3</h3>
<p>Make script to take photo and save it<br />
<code>cd ~/captures/scripts</code><br />
<code>vi captureme.sh</code></p>
<p>Insert the contents into the file:</p>
<pre>
CAPTURE="isightcapture -t jpg"
cd $HOME/captures
D1=`date +%y%m%d/%H`
D2=`date +%y%m%d.%H%M%S`

# If the date directory does not exist, create it
if [ ! -d $D1 ] ; then
mkdir -p $D1
fi

# Construct the filename and path and capture a pic
FN="$D1/$D2.jpg"
$CAPTURE $FN

# Make a symlinked image of the last photo taken
if [ -h 'last.jpg' ] ; then
rm last.jpg
fi
ln -s $FN last.jpg
</pre>
<p>Save and quit (:wq)</p>
<p>To be able to run this script we need to allow execution permission on this file.</p>
<p><code>chmod a+x captureme.sh</code></p>
<h3>Step 4</h3>
<p>Put your capture script on cron<br />
<code>crontab -e</code></p>
<p>Write the contents:</p>
<pre>* * * * * ~/captures/scripts/captureme.sh</pre>
<h3>Step 5</h3>
<p>Install a utility to convert a series of images to a movie. We will be using <a href="http://www.ffmpeg.org/">ffmpeg</a><br />
<code>cd /tmp/</code><br />
<code>svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg</code><br />
<code>cd ffmpeg</code></p>
<p>We need to install ffmpeg to our machine, this process is going to basically compile the code. Hopefully nothing will go wrong for you here, if it does though, take a look on <a href="http://stephenjungels.com/jungels.net/articles/ffmpeg-howto.html">http://stephenjungels.com/jungels.net/articles/ffmpeg-howto.html</a></p>
<p><code>./configure --enable-shared --disable-mmx</code><br />
<code>sudo make</code><br />
<code>sudo make install</code></p>
<h3>Step 5</h3>
<p>Make script to grab photos and run them through ffmpeg<br />
<code>mkdir ~/captures/videos/</code><br />
<code>cd ~/captures/scripts</code><br />
<code>vi make_complete_sequence.sh</code></p>
<p>Write the contents to the file:</p>
<pre>
COUNTER=0;
rm ~/captures/series/*.jpg
for i in `find ~/captures -name '*.jpg'` ;
do
#Write the filename to be friendly with ffmpeg's odd filename input
FILENAME=`printf '%03d.jpg' $COUNTER`
cp $i ~/captures/series/$FILENAME
let COUNTER=COUNTER+1;
done
nice ffmpeg -r 20 -vcodec copy  -i ~/captures/series/%3d.jpg ~/captures/videos/timelapse_complete.mov
</pre>
<p>Again setting the permissions to be able to run the script and then run it to generate a movie based on the images taken so far.</p>
<p><code>chmod a+x make_complete_sequence.sh</code><br />
<code>./make_complete_sequence.sh</code></p>
<h3>Step 6</h3>
<p>View the finished result<br />
Browse in finder to your home directory &gt; captures/videos and watch the result.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/timelapse-video-mac/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Ejecting a OS X mount when files are in use</title>
		<link>http://www.carbonsilk.com/development/ejecting-a-os-x-mount-when-files-are-in-use/</link>
		<comments>http://www.carbonsilk.com/development/ejecting-a-os-x-mount-when-files-are-in-use/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 10:10:24 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[dmg]]></category>
		<category><![CDATA[lsof]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=104</guid>
		<description><![CDATA[So the problem is that you want to eject a disk/DMG/mount on your Mac and it says it is still in use &#8220;The disk &#8220;x&#8221; is in use and could not be ejected.&#8221;. Here is the solution using your command line (Terminal.app) to be able to safely eject the mount. lsof +D /Volumes/{VolumeName}/ This will [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.carbonsilk.com/wp-content/uploads/2009/04/untitled.png" alt="Eject disk" title="Eject disk" /></p>
<p class="clear">So the problem is that you want to eject a disk/DMG/mount on your Mac and it says it is still in use &#8220;The disk &#8220;x&#8221; is in use and could not be ejected.&#8221;. Here is the solution using your command line (Terminal.app) to be able to safely eject the <a href="http://en.wikipedia.org/wiki/Mount_(Unix)">mount</a>.</p>
<p><code>lsof +D /Volumes/{VolumeName}/</code></p>
<p>This will give you some results like:</p>
<pre class="php"  name="code">COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
HoggingApp 69668 myuser  txt    REG   14,5  3791772   27 /Volumes/{VolumeName}/App.app/Contents/MacOS/App</pre>
<p>Hopefully you will recognise the application that is using that resource (in this example <em>HoggingApp</em>). If you can close this application you should be able to eject your mount now.</p>
<p>If closing the application did not work for some reason you could try the following command using the <a href="http://en.wikipedia.org/wiki/Process_identifier">PID</a> found from the above result(s)</p>
<p><code>kill <strong>69668</strong></code></p>
<p>Or If running a kill has a permissions based issue just add &#8216;<code>sudo</code>&#8216; to the beginning of the line (assuming you have sudo access).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/ejecting-a-os-x-mount-when-files-are-in-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using YQL with PHP</title>
		<link>http://www.carbonsilk.com/development/using-yql-with-php/</link>
		<comments>http://www.carbonsilk.com/development/using-yql-with-php/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 23:18:35 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[webservices]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=70</guid>
		<description><![CDATA[After presenting on PHP, OAuth and Web Services (4th February 2009) it became apparent that the main killer technology was YQL. YQL for those unfamiliar with the acronym is Yahoo Query Language, a SQL like syntax that will let you query a whole host of data sources as if it were a database table. Is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.yahoo.com/yql/"><img src="http://l.yimg.com/a/i/us/pps/yql128.gif" alt="YQL Logo" /></a>After presenting on <a href="http://www.slideshare.net/kulor/php-oauth-web-services-and-yql">PHP, OAuth and Web Services</a> (4th February 2009) it became apparent that the main killer technology was <a href="http://developer.yahoo.com/yql/"><acronym title="Yahoo Query Language">YQL</acronym></a>. YQL for those unfamiliar with the acronym is Yahoo Query Language, a <acronym title="Simple Query Language">SQL</acronym> like syntax that will let you query a whole host of data sources as if it were a database table.</p>
<p>Is YQL relevant to you? Well if you do any work with web services then definitely, it allows you to pull in multiple data sources, sort, transform, query your data points, to name but a few selling points. It will still be relevant to you if you are familiar with the SQL syntax, as it is actually really fun to play with <a href="http://developer.yahoo.com/yql/console/">using the console</a>, especially if you take the provided example queries as a jump off point to tinker with. To demonstrate how easy we can make things, take a look at this <a href="http://carbonsilk.com/yql_php/yql/search_yahoo/yql">example of a search query</a> using <a href="http://github.com/kulor/yql_php/blob/da559e966663a519f436d0aa9944212582806b98/system/application/controllers/yql.php#L65">this code</a>.</p>
<p>YQL is now becoming even more powerful with a feature called &#8216;Open Tables&#8217; which in essence instructs YQL on how to construct a web service URL. The power of this is that it enables you to interject values from other web service calls via sub selects. Some examples of Open Table definitions and <a href="http://github.com/spullara/yql-tables/blob/dea6b29ff0cd01e06fbaf84b821abf6783138b52/alltables.env">example queries</a> are being constructed at <a href="http://github.com/spullara/yql-tables/">github.com/spullara/yql-tables</a>.</p>
<p>During my talk I demonstrated a lot of the PHP code used to consume the results of the YQL calls which can be found over on <a href="http://github.com/kulor/yql_php/tree/master">my GitHub repository</a> or you can browse my example scripts at <a href="http://carbonsilk.com/yql_php/">http://carbonsilk.com/yql_php/</a>.</p>
<p>To make development in PHP straightforward I used CodeIgniter for it&#8217;s MVC strengths and ease of installation. The beauty of using the framework with YQL and OAuth libraries doing the hard work behind the scenes is that you can write a few simple lines like the following to retrieve instant results:</p>
<pre name="code" class="php">
// Controller method to allow us to access http://someurl.tld/yql_php/search_wikipedia/
function search_wikipedia($term = 'open')
{
    echo '&lt;pre&gt;';
    $yql_query = 'select * from xml where
            url="http://en.wikipedia.org/w/api.php?action=opensearch&amp;search=' . $term . '&amp;format=xml"
            and itemPath = "SearchSuggestion.Section.Item"';
    print_r($this-&gt;yql_lib-&gt;query($yql_query));
}</pre>
<p>The above code is the same query as could be found if you <a href="http://developer.yahoo.com/yql/console/?q=select%20*%20from%20xml%20where%20url%3D%22http%3A%2F%2Fen.wikipedia.org%2Fw%2Fapi.php%3Faction%3Dopensearch%26search%3Dyahoo%26format%3Dxml%22%20and%20itemPath%20%3D%20%22SearchSuggestion.Section.Item%22">view in the provided console</a> or view in my final project <a href="http://carbonsilk.com/yql_php/yql/search_wikipedia/open">Search Wikipedia through YQL</a>.</p>
<p>All I can say from doing this talk and looking deep into YQL is that there is a huge potential at our disposal here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/using-yql-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Panoramic &#8211; open source web template</title>
		<link>http://www.carbonsilk.com/development/panoramic-web-template/</link>
		<comments>http://www.carbonsilk.com/development/panoramic-web-template/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 18:55:16 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[panoramic]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=45</guid>
		<description><![CDATA[View the template It&#8217;s been a while since releasing an open source web template, the last one being Mighty, added back in January of 2007. Mighty was a template created to allow others to take a basic design and allow them to modify most aspects of the template with relative ease (given some CSS understanding). [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Panoramic template design by James Broad, on Flickr" href="http://www.flickr.com/photos/kulor/3089399053/"><img src="http://farm4.static.flickr.com/3252/3089399053_db33e5f9f6.jpg" alt="Panoramic template design" /></a></p>
<p class="clear"><a href="http://www.carbonsilk.com/sandbox/panoramic/index.html">View the template</a></p>
<p>It&#8217;s been a while since releasing an open source web template, the last one being <a href="http://www.oswd.org/design/information/id/3210/">Mighty</a>, added back in January of 2007. Mighty was a template created to allow others to take a basic design and allow them to modify most aspects of the template with relative ease (given some CSS understanding).</p>
<p>Time moved on and the itch arose again to create another open source web template. This time its called Panoramic. Panoramic is the name of the family business and this template design stemmed from a mock for the company I had created some time ago that never got released.</p>
<p><a href="http://github.com/">GitHub</a> seemed the best hosting location for an open source web template, owing to its fantastic interface and functionality and thus Panoramic lives there: <a href="http://github.com/kulor/panoramic/tree/master">http://github.com/kulor/panoramic/tree/master.</a></p>
<p>Having the template hosted on a <a href="http://en.wikipedia.org/wiki/Revision_Control_System">Revision Control System</a> such as GitHub, has many advantages, the main one being that others can contribute to the code and or fork to a version that suits them. Additionally, users downloading the code can always rest assured they are getting the latest code and can see what has changed over time.</p>
<p>If you do use the Panoramic template, please add a comment to this page stating where it is in use, so others can gain inspiration for it&#8217;s uses.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/panoramic-web-template/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to monitor your site status</title>
		<link>http://www.carbonsilk.com/development/monitor-your-site-status/</link>
		<comments>http://www.carbonsilk.com/development/monitor-your-site-status/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 17:36:26 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[siteup]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=44</guid>
		<description><![CDATA[If you are running and administering your own website, the chances are that your reputation relies on you having a stable site, or at least one that your users can reach. The problem is; how often do you check your site is up and running or how you expect it to look? Probably not often. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://flickr.com/photos/petecarr/475437514/"><img src="http://farm1.static.flickr.com/219/475437514_1565355424_m.jpg" alt="Traffic Lights" /></a>If you are running and administering your own website, the chances are that your reputation relies on you having a stable site, or at least one that your users can reach. The problem is; how often do you check your site is up and running or how you expect it to look? Probably not often.</p>
<p class="clear">I have produced a simple script that will let you check your sites are up and running.</p>
<p>The PHP script is hosted on GitHub at <a href="http://github.com/kulor/siteup/tree/master">http://github.com/kulor/siteup/tree/master</a>. You can see the output at <a href="http://carbonsilk.com/sandbox/siteup/">http://carbonsilk.com/sandbox/siteup/</a></p>
<p>To get this script running, you will need to change some of the defaults found in <a href="http://github.com/kulor/siteup/tree/master/index.php">index.php</a> and place both the files in a web accessible directory on your server</p>
<h3>Automating the script</h3>
<p>The best application of this script would be to deploy on your server (<strong>not on the server you are checking is up</strong>) and run on a <a href="http://en.wikipedia.org/wiki/Cron">crontab</a> at a fairly liberal interval (2 hours) to save server overload. To do this:</p>
<p>On your command line:<br />
<code>$ crontab -e</code></p>
<p>This will take you into an editor window. Enter the line below <strong>replacing {$path} with the location of your script</strong><br />
<code>0       */2     *     *     *   php -q /{$path}/siteup/index.php</code></p>
<p>Now you will receive an email if any of your programmed domains are down.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/monitor-your-site-status/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Some updates to the site</title>
		<link>http://www.carbonsilk.com/development/some-updates-to-the-site/</link>
		<comments>http://www.carbonsilk.com/development/some-updates-to-the-site/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 10:50:45 +0000</pubDate>
		<dc:creator>James Broad</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[carbonsilk]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://www.carbonsilk.com/?p=39</guid>
		<description><![CDATA[In case you have not already noticed, there has been some tweaks to Carbon Silk over the last couple of weeks (that last bit rhymes). It was about time that Carbon Silk demanded some development attention, that has otherwise been snatched from other pressing commitments including; travel, moneyio and work. Without further ado, this is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-40" src="http://www.carbonsilk.com/wp-content/uploads/2008/10/building-skyscraper-websites-carbon-silk-developing-ideas-by-james-broad-20081023-150x150.jpg" alt="" />In case you have not already noticed, there has been some tweaks to Carbon Silk over the last couple of weeks (that last bit rhymes).</p>
<p>It was about time that Carbon Silk demanded some development attention, that has otherwise been snatched from other pressing commitments including; <a href="http://www.carbonsilk.com/development/open-hackday-2008/">travel</a>, <a href="http://www.carbonsilk.com/development/moneyio-released/">moneyio</a> and <a href="http://finance.yahoo.com">work</a>. Without further ado, this is what has changed:</p>
<ul>
<li>New header graphic, kind of an experiment to balance the header and break the grid.</li>
<li>New <a href="http://www.carbonsilk.com/publications/">publications</a> section. Hopefully this will expand elegantly with time.</li>
<li>You will get a list of related article links when viewing an article (in the sidebar), replacing the categories section.</li>
<li>A shiny new <a href="http://www.carbonsilk.com/archives/">archives</a> page has arrived with new means to discover content across the site.</li>
<li>A new <a href="http://www.carbonsilk.com/wp-content/themes/carbonsilk2/favicon.ico">favicon</a>.</li>
<li><a href="http://feeds.feedburner.com/carbonsilk">RSS</a> has been handed off to <a href="http://www.feedburner.com">Feedburner</a> to gain better metric insights. The old one will still work, though.</li>
</ul>
<p>I have posted a <a href="http://flickr.com/photos/kulor/2966824456/">snapshot</a> of an <a href="http://www.carbonsilk.com/development/building-skyscraper-websites/">article</a> from this point in time to make this post relevant for later readers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carbonsilk.com/development/some-updates-to-the-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
