<?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>Supernifty - nifty stuff &#187; hack</title>
	<atom:link href="http://www.supernifty.com.au/blog/category/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.supernifty.com.au/blog</link>
	<description>that is also super</description>
	<lastBuildDate>Fri, 03 Feb 2012 06:58:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JavaScript Task Queue &#8211; Hack it #9</title>
		<link>http://www.supernifty.com.au/blog/2011/07/17/javascript-task-queue-hack-it-9/</link>
		<comments>http://www.supernifty.com.au/blog/2011/07/17/javascript-task-queue-hack-it-9/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 04:28:37 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://www.supernifty.com.au/blog/?p=392</guid>
		<description><![CDATA[Suppose you have a lot of tasks with completion callbacks to complete in the browser, but you want to do them sequentially. For instance, you might have a list of AJAX requests to make to your server.
This JavaScript demonstrates a simple solution:

If you can&#8217;t see the source code, look here.
]]></description>
			<content:encoded><![CDATA[<p>Suppose you have a lot of tasks with completion callbacks to complete in the browser, but you want to do them sequentially. For instance, you might have a list of AJAX requests to make to your server.</p>
<p>This JavaScript demonstrates a simple solution:<br />
<script src="https://gist.github.com/1087170.js?file=gistfile1.js"></script></p>
<p>If you can&#8217;t see the source code, <a href="https://gist.github.com/1087170">look here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.supernifty.com.au/blog/2011/07/17/javascript-task-queue-hack-it-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ultra Simple PHP Profiling &#8211; Hack it #8</title>
		<link>http://www.supernifty.com.au/blog/2010/11/09/ultra-simple-php-profiling-hack-it-8/</link>
		<comments>http://www.supernifty.com.au/blog/2010/11/09/ultra-simple-php-profiling-hack-it-8/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 07:25:08 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[hack]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://www.supernifty.com.au/blog/?p=203</guid>
		<description><![CDATA[We wanted to profile a few PHP scripts, so we tried xdebug, but there were a few issues:

Not suitable for a production server
Difficult to turn on/off for specific scripts and requests
Difficult to profile MySQL queries, without also attracting a mass of other data

xdebug is better for offline application profiling. 
If you just want to track [...]]]></description>
			<content:encoded><![CDATA[<p>We wanted to profile a few PHP scripts, so we tried xdebug, but there were a few issues:</p>
<ul>
<li>Not suitable for a production server</li>
<li>Difficult to turn on/off for specific scripts and requests</li>
<li>Difficult to profile MySQL queries, without also attracting a mass of other data</li>
</ul>
<p>xdebug is better for offline application profiling. </p>
<p>If you just want to track down a bottleneck, or see what your script is spending all its time doing, here&#8217;s a simple alternative.</p>
<p><script src="https://gist.github.com/668809.js?file=profiler_usage.php"></script></p>
<p>To profile your SQL, replace <strong>mysql_query</strong> with <strong>mysql_queryx</strong>.</p>
<p>This generates a CSV file at <strong>/tmp/profile.1</strong> for easy analysis.</p>
<p>Now create the file <strong>profile.php</strong>:<br />
<script src="https://gist.github.com/668809.js?file=profile.php"></script></p>
<p>Too easy!</p>
<p>To stop profiling a page, set <strong>$profile = false</strong>.</p>
<p>If you&#8217;re concerned about performance, do something like <strong>$profile = rand(0, 100) > 99</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.supernifty.com.au/blog/2010/11/09/ultra-simple-php-profiling-hack-it-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>py2exe, python 2.6 and wxPython &#8211; hack it #7</title>
		<link>http://www.supernifty.com.au/blog/2010/07/06/py2exe-python-2-6-and-wxpython-hack-it-7/</link>
		<comments>http://www.supernifty.com.au/blog/2010/07/06/py2exe-python-2-6-and-wxpython-hack-it-7/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 09:20:25 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[hack]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://www.supernifty.com.au/blog/?p=102</guid>
		<description><![CDATA[
If you&#8217;ve tried to build a client application with Python 2.6 and wxPython, you might hit a problem. 
Python 2.6 no longer includes the Visual Studio dependencies required by wxPython. These dependencies may not be present, either on your build machine, or the target user&#8217;s machine.
When building with py2exe, you may encounter an error similar [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/python.png" align="left" class="alignleft" alt="Python" title="Python"/><br />
If you&#8217;ve tried to build a client application with Python 2.6 and wxPython, you might hit a problem. </p>
<p>Python 2.6 no longer includes the Visual Studio dependencies required by wxPython. These dependencies may not be present, either on your build machine, or the target user&#8217;s machine.</p>
<p>When building with py2exe, you may encounter an error similar to:</p>
<div class="code">error: MSVCP90.dll: No such file or directory</div>
<p><strong>The solution!</strong></p>
<p>To successfully <strong>build</strong> your executable, you need the Visual Studio 2008 redistributable package, which can be obtained from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&#038;displaylang=en">Microsoft</a>. Run this on your build machine to install the appropriate DLLs.</p>
<p>If your build still fails, you may need to copy the DLLs into your build directory. Locate msvcp90.dll, msvcm90.dll and msvcr90.dll on your machine and copy them to the build directory.</p>
<p>Once you have a successful Python build, you also want your executable to run on the <strong>target</strong> machine. To do this, your install script needs to install the vcredist package as part of the installation.</p>
<p>The command you need to run as part of your client installation is:</p>
<div class="code">vcredist_x86.exe /q:a</div>
<p>If you are using NSIS as your installer, the appropriate code is:</p>
<div class="code">
  File /r vcredist_x86.exe ;to copy the file<br />
  ExecWait &#8216;&#8221;$INSTDIR\vcredist_x86.exe&#8221; /q:a&#8221;&#8216; ;to install
</div>
<p>With the Visual Studio redistributable installed, it will now execute successfully on the target machine. <strong>Hurrah!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.supernifty.com.au/blog/2010/07/06/py2exe-python-2-6-and-wxpython-hack-it-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<ti
