<?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>chealion.ca : Home of Micheal Jones &#187; development</title>
	<atom:link href="http://chealion.ca/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://chealion.ca</link>
	<description>polluting the internet since tomorrow</description>
	<lastBuildDate>Wed, 21 Sep 2011 23:28:46 +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>Using Compressor to Make H.264 MP4s</title>
		<link>http://chealion.ca/2010/09/using-compressor-to-make-better-html5-video-draft/</link>
		<comments>http://chealion.ca/2010/09/using-compressor-to-make-better-html5-video-draft/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 20:06:05 +0000</pubDate>
		<dc:creator>Micheal</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[compressor]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[mp4]]></category>
		<category><![CDATA[quicktime]]></category>
		<category><![CDATA[x264]]></category>

		<guid isPermaLink="false">http://chealion.ca/?p=329</guid>
		<description><![CDATA[In April I pushed to GitHub my RewraptoMP4 Script I put together to help assist in creating proper MPEG-4 container files while being able to use the x264 QuickTime component in Compressor. Compressor only allows you to specify the codec being used when exporting to a QuickTime file, however it is possible to use QuickTime [...]]]></description>
			<content:encoded><![CDATA[<p>In April I pushed to GitHub my <a href="http://github.com/Chealion/chealion/tree/master/Applescripts/RewrapMP4/">RewraptoMP4 Script</a> I put together to help assist in creating proper MPEG-4 container files while being able to use the <a href="http://www003.upp.so-net.ne.jp/mycometg3/">x264 QuickTime component</a> in Compressor. Compressor only allows you to specify the codec being used when exporting to a QuickTime file, however it is possible to use QuickTime Player after the fact to convert a QuickTime Movie to an MPEG-4 without transcoding so long as the codecs are supported in the MPEG-4 container spec.</p>

<p>My primary reason for the extra work is that Google Chrome will not recognize a .mov file as a valid wrapper for video in HTML 5&#8217;s <code>&lt;video&gt;</code> tags.</p>

<h2>Using Compressor</h2>

<p>You need to make your Compressor preset using x264 as a normal QuickTime movie preset (use the table below to help with settings if necessary). You&#8217;ll then want to grab the script from GitHub and add it as a script to your preset.</p>

<p>Scripting Compressor isn&#8217;t very straight forward, while you can use AppleScript or launch a script using Compressor they fail to mention that the script <em>must</em> be saved as an application and the file is accessed by using on open.</p>

<h2>Helpful Table of Limitations</h2>

<table width="100%">
<tbody>
<tr><th>Device</th><th>Max Res</th><th>Max Bit Rate</th><th width="325px">H.264 Settings</th></tr>
<tr><td>iPhone</td><td>640x480</td><td>2.5&#160;Mbps</td><td>Can only use Baseline profile Level 3.0 with CAVLC</td></tr>
<tr><td>iPod touch</td><td>640x480</td><td>2.5&#160;Mbps</td><td>Can only use Baseline profile Level 3.0 with CAVLC</td></tr>
<tr><td>iPhone 3G</td><td>640x480</td><td>2.5&#160;Mbps</td><td>Can only use Baseline profile Level 3.0 with CAVLC</td></tr>
<tr><td>iPod touch 2G</td><td>640x480</td><td>2.5&#160;Mbps</td><td>Can only use Baseline profile Level 3.0 with CAVLC</td></tr>
<tr><td>iPhone 3G S</td><td>640x480</td><td>2.5&#160;Mbps</td><td>Can only use Baseline profile Level 3.0 with CAVLC</td></tr>
<tr><td>iPod touch 3G</td><td>640x480</td><td>2.5&#160;Mbps</td><td>Can only use Baseline profile Level 3.0 with CAVLC</td></tr>
<tr><td>iPad</td><td>1280x720</td><td>&#8220;Unlimited&#8221;</td><td>Can only use up to Main Profile Level 3.1</td></tr>
<tr><td>iPhone 4</td><td>1280x720</td><td>&#8220;Unlimited&#8221;</td><td>Can only use up to Main Profile Level 3.1</td></tr>
<tr><td>iPod touch 4G</td><td>1280x720</td><td>&#8220;Unlimited&#8221;</td><td>Can only use up to Main Profile Level 3.1</td></tr>
<tr><td>G1</td><td>480x320</td><td>600</td><td>Lack of documentation for anything Android</td></tr>
<tr><td>Droid X</td><td>1280x720</td><td>?</td><td>Lack of documentation for anything Android - can&#8217;t play more than 24FPS</td></tr>
</tbody>
</table>

<p>Android information is rather limited. Official Android information is near non-existent.</p>

<p>Thanks to:
  - http://www.proactiveinteractive.com/software/compressor/index.php</p>
]]></content:encoded>
			<wfw:commentRss>http://chealion.ca/2010/09/using-compressor-to-make-better-html5-video-draft/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Xdebug, Leopard, and 64-bit shenanigans.</title>
		<link>http://chealion.ca/2009/11/xdebug-leopard-and-64-bit-shenanigans/</link>
		<comments>http://chealion.ca/2009/11/xdebug-leopard-and-64-bit-shenanigans/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 00:10:56 +0000</pubDate>
		<dc:creator>Micheal</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[apple]]></category>

		<guid isPermaLink="false">http://chealion.ca/?p=271</guid>
		<description><![CDATA[In order to profile some in house web application development and find out a couple bottlenecks that were appearing I went looking for a decent PHP profiler and found Xdebug. Because I am using the built in version of PHP on the Leopard Server, and a MacPorts version on Snow Leopard (we also have an [...]]]></description>
			<content:encoded><![CDATA[<p>In order to profile some in house web application development and find out a couple bottlenecks that were appearing I went looking for a decent PHP profiler and found <a href="http://xdebug.org/">Xdebug</a>. Because I am using the built in version of PHP on the Leopard Server, and a MacPorts version on Snow Leopard (we also have an application that fails miserably on PHP 5.3) it lead to some fun installing Xdebug on the Leopard machine since I didn&#8217;t want to reconfigure apache2 to use PHP 5.3 from MacPorts.</p>

<p>The crux of it is to grab the source of Xdebug, and then when configuring prefix your standard <code>./configure --enable-xdebug</code> with the statement <code>CFLAGS='-arch ppc64'</code> or <code>CFLAGS='-arch x86_64'</code> as necessary. Compile xdebug as a 64-bit extension and it will actually work with a 64-bit version of Apache. With MacPorts it was as simple as enabling the xdebug variant and letting it recompile PHP.</p>

<p>I highly recommend using <a href="http://code.google.com/p/webgrind/">webgrind</a>. It gave me more useful results than <a href="http://www.maccallgrind.com/">MacCallGrind</a>, and didn&#8217;t require an hour hoping <a href="http://macports.org">MacPorts</a> could compile all the dependencies for <a href="http://kcachegrind.sourceforge.net/html/Home.html">kcachegrind</a> (which would require graphviz as an additional install). Now I have some numbers to tell me where to look for proof <a href="http://www.cimgf.com/2009/03/26/dont-blindly-trust-debb/">old me is a moron</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chealion.ca/2009/11/xdebug-leopard-and-64-bit-shenanigans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chromium Mac Build Bot Updater Script</title>
		<link>http://chealion.ca/2009/05/chromium-build-bot-updater-script/</link>
		<comments>http://chealion.ca/2009/05/chromium-build-bot-updater-script/#comments</comments>
		<pubDate>Wed, 13 May 2009 22:07:34 +0000</pubDate>
		<dc:creator>Micheal</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://chealion.ca/?p=238</guid>
		<description><![CDATA[When I read on MacRumors that the Chromium builds for the Mac were available and were actually launching the &#8220;stupid&#8221; geek in me jumped at the opportunity to try the unfinished, unpolished software. By &#8220;stupid&#8221; I refer to the side of near any geek who sees the OOO SHINY and is fully prepared to deal [...]]]></description>
			<content:encoded><![CDATA[<p>When I read on <a href="http://macrumors.com">MacRumors</a> that the Chromium builds for the Mac were available and were actually launching the &#8220;stupid&#8221; geek in me jumped at the opportunity to try the unfinished, unpolished software. By &#8220;stupid&#8221; I refer to the side of near any geek who sees the OOO SHINY and is fully prepared to deal with the instability and issues that will crop up with using pre-alpha/alpha software. Naturally when I saw how fast and furious the updates were happening alongside the fact there was no automatic update mechanism apparent in Chromium (I don&#8217;t have the Google Updater installed and don&#8217;t want to) I sought to find out how to automate the updates to make the pain of manual downloads, copies and such go away.</p>

<p>Using my previous WebKit script, 5 minutes looking at the Chromium application layout and how the builds are stored on the server I changed the script. I fully expect it to break horribly in the future as Google changes folder layouts and/or adds Chromium support to their own &#8220;silent&#8221; updating mechanism.</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Based off my WebKit nightly script (now defunct as WebKit uses Sparkle)</span>
<span style="color: #666666; font-style: italic;"># Copyright 2009 Micheal Jones</span>
<span style="color: #666666; font-style: italic;"># Software License: Do whatever you want.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Find current revision</span>
<span style="color: #007800;">currentRevision</span>=<span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>PlistBuddy <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'Print :SVNRevision'</span> <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>Chromium.app<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Info.plist<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Get latest revision</span>
<span style="color: #007800;">latestRevision</span>=<span style="color: #000000; font-weight: bold;">`</span>curl <span style="color: #660033;">-s</span> http:<span style="color: #000000; font-weight: bold;">//</span>build.chromium.org<span style="color: #000000; font-weight: bold;">/</span>f<span style="color: #000000; font-weight: bold;">/</span>buildbot<span style="color: #000000; font-weight: bold;">/</span>snapshots<span style="color: #000000; font-weight: bold;">/</span>chromium-rel-mac<span style="color: #000000; font-weight: bold;">/</span>LATEST<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Abort if there is no update</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$latestRevision</span> <span style="color: #660033;">-le</span> <span style="color: #007800;">$currentRevision</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;There is no update for Chromium available&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Append download address</span>
<span style="color: #007800;">address</span>=<span style="color: #ff0000;">'http://build.chromium.org/f/buildbot/snapshots/chromium-rel-mac/'</span><span style="color: #800000;">${latestRevision}</span><span style="color: #ff0000;">'/chrome-mac.zip'</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Downloading... <span style="color: #007800;">$address</span>&quot;</span>
curl <span style="color: #660033;">-s</span> <span style="color: #007800;">$address</span> <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>chrome.zip
&nbsp;
<span style="color: #666666; font-style: italic;">#Abort if the build is not available</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`head -n 3 /tmp/chrome.zip | tail -n 1`</span>&quot;</span> = <span style="color: #ff0000;">&quot;&lt;title&gt;404 Not Found&lt;/title&gt;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;
<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Latest Version is not available yet (try again in a couple minutes)&quot;</span>
	<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>chrome-mac.zip
	<span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Unzip</span>
<span style="color: #c20cb9; font-weight: bold;">unzip</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>chrome.zip <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Copying...&quot;</span>
<span style="color: #666666; font-style: italic;">#Copy to Applications</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-RfL</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>chrome-mac<span style="color: #000000; font-weight: bold;">/</span>Chromium.app <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Cleaning up...&quot;</span>
<span style="color: #666666; font-style: italic;">#Clean up</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>chrome<span style="color: #000000; font-weight: bold;">*</span>
&nbsp;
<span style="color: #007800;">revision</span>=<span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>PlistBuddy <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'Print :SVNRevision'</span> <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>Chromium.app<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Info.plist<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Finished. (r<span style="color: #007800;">$revision</span>)&quot;</span></pre></div></div>


<p>Realistically you should be looking for the latest source at the link below:</p>

<p>As always this script can be found in my <a href="http://github.com/Chealion/chealion">git repository</a> on <a href="http://github.com">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chealion.ca/2009/05/chromium-build-bot-updater-script/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Quick Looking a .csv File</title>
		<link>http://chealion.ca/2009/05/quick-looking-a-csv-file/</link>
		<comments>http://chealion.ca/2009/05/quick-looking-a-csv-file/#comments</comments>
		<pubDate>Mon, 11 May 2009 21:37:04 +0000</pubDate>
		<dc:creator>Micheal</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[quick look]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://chealion.ca/?p=234</guid>
		<description><![CDATA[On ServerFault someone was asked a question why .csv files were unable to be viewed in Quick Look. For some reason .csv files are not defined as plain text by the operating system which leads to odd conflicts between applications that can deal with .csv files that causes QuickLook to report that it can&#8217;t find [...]]]></description>
			<content:encoded><![CDATA[<p>On <a href="http://serverfault.com">ServerFault</a> someone was <a href="http://serverfault.com/questions/6863/how-do-i-view-csv-files-in-quicklook">asked</a> a question why .csv files were unable to be viewed in Quick Look. For some reason .csv files are not defined as plain text by the operating system which leads to odd conflicts between applications that can deal with .csv files that causes QuickLook to report that it can&#8217;t find a generator for the file and just show the icon.</p>

<p>The one way to force it to work is to roll your own, with a bit of <a href="http://www.viddler.com/explore/lammig/videos/6/">help</a> after reading the <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/Quicklook%5FProgramming%5FGuide/Introduction/Introduction.html">QuickLook Programming Reference</a> it was rather simple to roll together a proof of concept QuickLook generator for .csv files.</p>

<p>It&#8217;s not pretty, it may break at any time (if only because it&#8217;s using a dynamic UTI since one is not defined anywhere, however .csv files have been using the UTI &#8220;dyn.age80g650&#8221; for quite a while - as far back as prior to 10.0) but it works and forces the .csv to display properly.</p>

<p>The code and a download of CSVQL is available on GitHub:</p>

<p>Source: <a href="http://github.com/Chealion/chealion/tree/master">http://github.com/Chealion/chealion/tree/master</a></p>

<p>Download: <a href="http://cloud.github.com/downloads/Chealion/chealion/CSVQL.zip">http://cloud.github.com/downloads/Chealion/chealion/CSVQL.zip</a></p>

<p>Check out <a href="http://chealion.ca/2009/05/quick-looking-a-csv-file/#comments">Pascal&#8217;s comment</a> for a much nicer looking version - actually puts the data into tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://chealion.ca/2009/05/quick-looking-a-csv-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebKit Nightly Update Script</title>
		<link>http://chealion.ca/2008/09/webkit-nightly-update-script/</link>
		<comments>http://chealion.ca/2008/09/webkit-nightly-update-script/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 04:15:23 +0000</pubDate>
		<dc:creator>Micheal</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://chealion.ca/?p=81</guid>
		<description><![CDATA[This is a repost of a much older post that was lost when I transitioned from Moveable Type 3 to 4. I personally like using WebKit nightlies as my main browser as it&#8217;s more or less Safari with a better, faster, and much more current rendering engine underneath it. That and the gold logo looks [...]]]></description>
			<content:encoded><![CDATA[<p>This is a repost of a much older post that was lost when I transitioned from Moveable Type 3 to 4.</p>

<p>I personally like using WebKit nightlies as my main browser as it&#8217;s more or less Safari with a better, faster, and much more current rendering engine underneath it. That and the gold logo looks much better than the silver. It does have bugs occasionally (for example I was unable to post comments to Flickr with WebKit nightlies for a couple weeks) but all in all the experience is very positive. This is the script I use to keep WebKit updated whenever it bugs me for an update. I use an alias in my .bashrc file so I can just type &#8216;wkupdate&#8217; to run the shell script. The best part is that if I copy it and I&#8217;m still using the program the changes won&#8217;t take effect until I restart but it allows me to copy it still. (Not advisable however)</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Find current revision</span>
<span style="color: #007800;">currentRevision</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>WebKit.app<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Resources<span style="color: #000000; font-weight: bold;">/</span>VERSION<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Get address</span>
<span style="color: #666666; font-style: italic;">#Download start page and find address</span>
<span style="color: #007800;">address</span>=<span style="color: #000000; font-weight: bold;">`</span>curl <span style="color: #660033;">-s</span> http:<span style="color: #000000; font-weight: bold;">//</span>nightly.webkit.org<span style="color: #000000; font-weight: bold;">/</span>start<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$currentRevision</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">'WebKit-SVN-r[0-9]*'</span> <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Abort if there is no update</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$address</span>&quot;</span> == <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;There is no update for WebKit available&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Append download address</span>
<span style="color: #007800;">address</span>=<span style="color: #ff0000;">'http://nightly.webkit.org/files/trunk/mac/'</span><span style="color: #800000;">${address}</span><span style="color: #ff0000;">'.dmg'</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Downloading... <span style="color: #007800;">$address</span>&quot;</span>
curl <span style="color: #660033;">-s</span> <span style="color: #007800;">$address</span> <span style="color: #660033;">-o</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>WebKit.dmg
<span style="color: #666666; font-style: italic;">#Mount Image</span>
hdid <span style="color: #660033;">-readonly</span> <span style="color: #660033;">-quiet</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>WebKit.dmg
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Copying...&quot;</span>
<span style="color: #666666; font-style: italic;">#Copy to Applications</span>
<span style="color: #007800;">revision</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>WebKit<span style="color: #000000; font-weight: bold;">/</span>WebKit.app<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Resources<span style="color: #000000; font-weight: bold;">/</span>VERSION<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-RfL</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>WebKit<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>WebKit<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Cleaning up...&quot;</span>
<span style="color: #666666; font-style: italic;">#Clean up</span>
hdiutil detach <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>WebKit<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-quiet</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>WebKit.dmg
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Finished. (r<span style="color: #007800;">$revision</span>)&quot;</span></pre></div></div>


<p>EDIT: Updated 12/30/08 - Fixed URL check. Realistically you should be looking for the latest source at the link below:</p>

<p>As always this script can be found in my <a href="http://github.com/Chealion/chealion">git repository</a> on <a href="http://github.com">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chealion.ca/2008/09/webkit-nightly-update-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitHub</title>
		<link>http://chealion.ca/2008/09/github/</link>
		<comments>http://chealion.ca/2008/09/github/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 18:34:04 +0000</pubDate>
		<dc:creator>Micheal</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://chealion.ca/?p=53</guid>
		<description><![CDATA[In order to make it easier to access the crap code I make in the various posts I&#8217;ve created a git repository on GitHub. You can access it at http://github.com/Chealion/chealion. I leave it as an exercise to the reader on how they should install git and if necessary access said information. At present the only [...]]]></description>
			<content:encoded><![CDATA[<p>In order to make it easier to access the <strike>crap</strike> code I make in the various posts I&#8217;ve created a git repository on <a href="http://github.com">GitHub</a>. You can access it at <a href="http://github.com/Chealion/chealion">http://github.com/Chealion/chealion</a>. I leave it as an exercise to the reader on how they should install git and if necessary access said information.</p>

<p>At present the only code snippets available are just the <a href="http://chealion.ca/2008/09/openingcopying-locked-dvds/">Locked DVD Applecript</a> (<a href="http://github.com/Chealion/chealion/tree/master/LockedDVD">Git</a>) and the <a href="http://chealion.ca/2008/06/tab-count-to-growl-for-safari/">Tab Count to Growl AppleScript</a> (<a href="http://github.com/Chealion/chealion/tree/master/TabCountGrowl">Git</a>). Several of my other scripts will be made available in the next couple of days.</p>

<p>UPDATE: The WebKit nightly script has been added.</p>
]]></content:encoded>
			<wfw:commentRss>http://chealion.ca/2008/09/github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opening/Copying Locked DVDs</title>
		<link>http://chealion.ca/2008/09/openingcopying-locked-dvds/</link>
		<comments>http://chealion.ca/2008/09/openingcopying-locked-dvds/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 17:56:15 +0000</pubDate>
		<dc:creator>Micheal</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://chealion.ca/?p=42</guid>
		<description><![CDATA[At work we sometimes receive DVDs that we need footage off of that are locked. They will play back fine in DVD Player but we don&#8217;t want it for playback. The resulting DVD images are always titled SONATA_VOLUME and are created by a stand alone Sony DVD Recorder. In order to copy the VIDEO_TS file [...]]]></description>
			<content:encoded><![CDATA[<p>At work we sometimes receive DVDs that we need footage off of that are locked. They will play back fine in DVD Player but we don&#8217;t want it for playback. The resulting DVD images are always titled SONATA_VOLUME and are created by a stand alone Sony DVD Recorder.</p>

<p>In order to copy the VIDEO_TS file off of the DVD you require sudo access but given that sudo access is limited to administrators (and not the editors) - this gets to be a bit of hassle because I have to be called to copy the DVD which adds unnecessary overhead to just get some footage off a simple DVD.</p>

<p>The solution? Create a droplet application (in this case AppleScript with shell scripts) so the editors don&#8217;t have to disrupt their workflow to get me to unlock the footage they need.</p>

<p>The source follows:</p>


<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">(* Files dropped onto the application will be copied to the root folder
of the main hard drive and set so the user has ownership - allowing 
them to move, rename and delete said file/folder. *)</span>
<span style="color: #ff0033; font-weight: bold;">on</span> <span style="color: #0066ff;">open</span> files_
	<span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">with</span> file_ <span style="color: #ff0033; font-weight: bold;">in</span> files_
		<span style="color: #808080; font-style: italic;">--Get name of file, path, and the current username of editor</span>
		<span style="color: #ff0033; font-weight: bold;">set</span> name_ <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">name</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">info for</span> file_<span style="color: #000000;">&#41;</span>
		<span style="color: #ff0033; font-weight: bold;">set</span> file_ <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">POSIX path</span> <span style="color: #ff0033; font-weight: bold;">of</span> file_
		<span style="color: #ff0033; font-weight: bold;">set</span> username_ <span style="color: #ff0033; font-weight: bold;">to</span> short user <span style="color: #0066ff;">name</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span>system info<span style="color: #000000;">&#41;</span>
		<span style="color: #808080; font-style: italic;">(* The 3 shell commands here can be condensed into one longer line
			but I left them separate for debugging and readability reasons
		*)</span>
		<span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;/bin/cp -R &quot;</span> <span style="color: #000000;">&amp;</span> <span style="color: #0066ff;">quoted form</span> <span style="color: #ff0033; font-weight: bold;">of</span> file_ <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot; /&quot;</span> <span style="color: #000000;">&amp;</span> <span style="color: #0066ff;">quoted form</span> <span style="color: #ff0033; font-weight: bold;">of</span> name_ user <span style="color: #0066ff;">name</span> <span style="color: #009900;">&quot;ADMIN_USER_NAME&quot;</span> password <span style="color: #009900;">&quot;PASSWORD&quot;</span> <span style="color: #ff0033; font-weight: bold;">with</span> administrator privileges
		<span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;/bin/chmod -R 777 /&quot;</span> <span style="color: #000000;">&amp;</span> <span style="color: #0066ff;">quoted form</span> <span style="color: #ff0033; font-weight: bold;">of</span> name_ user <span style="color: #0066ff;">name</span> <span style="color: #009900;">&quot;ADMIN_USER_NAME&quot;</span> password <span style="color: #009900;">&quot;PASSWORD&quot;</span><span style="color: #009900;">&quot; with administrator privileges
		do shell script &quot;</span><span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>sbin<span style="color: #000000;">/</span>chown <span style="color: #000000;">-</span>R <span style="color: #009900;">&quot; &amp; username_ &amp; &quot;</span> <span style="color: #000000;">/</span><span style="color: #009900;">&quot; &amp; quoted form of name_ user name &quot;</span>ADMIN_USER_NAME<span style="color: #009900;">&quot; password &quot;</span>PASSWORD<span style="color: #009900;">&quot;smoke@#$&quot;</span> <span style="color: #ff0033; font-weight: bold;">with</span> administrator privileges
		<span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;open /&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #0066ff;">open</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chealion.ca/2008/09/openingcopying-locked-dvds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tab Count to Growl for Safari</title>
		<link>http://chealion.ca/2008/06/tab-count-to-growl-for-safari/</link>
		<comments>http://chealion.ca/2008/06/tab-count-to-growl-for-safari/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 20:50:41 +0000</pubDate>
		<dc:creator>Micheal</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[growl]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://chealion.ca/?p=35</guid>
		<description><![CDATA[The following AppleScript snippet figures out how many tabs are open in the frontmost window and spits it out to Growl. Helps when I don’t feel like counting how many tabs I’ve opened in WebKit/Safari. Note: To get this to work with Safari change WebKit to Safari. tell application &#34;WebKit&#34; activate set numtabs to index [...]]]></description>
			<content:encoded><![CDATA[<p>The following AppleScript snippet figures out how many tabs are open in the frontmost window and spits it out to Growl. Helps when I don’t feel like counting how many tabs I’ve opened in WebKit/Safari. Note: To get this to work with Safari change WebKit to Safari.</p>


<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;WebKit&quot;</span>
    <span style="color: #0066ff;">activate</span>
    <span style="color: #ff0033; font-weight: bold;">set</span> numtabs <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033;">index</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #ff0033;">last</span> <span style="color: #0066ff;">tab</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #ff0033;">front</span> <span style="color: #0066ff;">window</span>
    <span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;GrowlHelperApp&quot;</span>
        <span style="color: #ff0033; font-weight: bold;">set</span> <span style="color: #ff0033;">the</span> allNotificationsList <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#123;</span><span style="color: #009900;">&quot;Number of Tabs&quot;</span><span style="color: #000000;">&#125;</span>
        <span style="color: #ff0033; font-weight: bold;">set</span> <span style="color: #ff0033;">the</span> enabledNotificationsList <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#123;</span><span style="color: #009900;">&quot;Number of Tabs&quot;</span><span style="color: #000000;">&#125;</span>
        register <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Growl AppleScript Sample&quot;</span> all notifications allNotificationsList default notifications enabledNotificationsList icon <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;WebKit&quot;</span>
&nbsp;
        notify <span style="color: #ff0033; font-weight: bold;">with</span> <span style="color: #0066ff;">name</span> <span style="color: #009900;">&quot;Number of Tabs&quot;</span> title <span style="color: #009900;">&quot;Number of Tabs&quot;</span> description <span style="color: #009900;">&quot;&quot;</span> <span style="color: #000000;">&amp;</span> numtabs <span style="color: #0066ff;">application</span> <span style="color: #0066ff;">name</span> <span style="color: #009900;">&quot;Growl AppleScript Sample&quot;</span>
    <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chealion.ca/2008/06/tab-count-to-growl-for-safari/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

