<?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>Wade Womersley - Leeds based web developer</title>
	<atom:link href="http://www.xcitestudios.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xcitestudios.com/blog</link>
	<description>Giving in to the online blogosphere</description>
	<lastBuildDate>Sun, 05 Feb 2012 18:13:09 +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>Regular Expression (Regex) For Date part extraction/array split</title>
		<link>http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 18:13:09 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=573</guid>
		<description><![CDATA[<p>Needed to use this recently to create a specificity parameter for an API at work, it gives you a key/value array from an ISO date string regardless of what is actually set in the string (e.g. if you give 2011-06-07 04 you&#8217;ll get an array back as array(&#8216;year&#8217;=&#62;2011, &#8216;month&#8217; =&#62; 6, &#8216;day&#8217; =&#62; 7, &#8216;hour&#8217; =&#62; 4). If you enter 2011-06-07 04:43 you&#8217;ll get: array(&#8216;year&#8217;=&#62;2011, &#8216;month&#8217; =&#62; 6, &#8216;day&#8217; =&#62; 7, &#8216;hour&#8217; =&#62; 4, &#8216;minute&#8217; =&#62; 43), works from just a year all the way to seconds.</p>
<p><a href="http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/#utm_source=feed&#38;utm_medium=feed&#38;utm_campaign=feed" class="more-link">Read more on Regular Expression (Regex) For Date part extraction/array split&#8230;</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/02/26/regex-fu-phpuk2010/' rel='bookmark' title='Regex-fu #PHPUK2010'>Regex-fu #PHPUK2010</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/02/26/regex-fu-phpuk2010/' rel='bookmark' title='Regex-fu #PHPUK2010'>Regex-fu #PHPUK2010</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Needed to use this recently to create a specificity parameter for an API at work, it gives you a key/value array from an ISO date string regardless of what is actually set in the string (e.g. if you give 2011-06-07 04 you&#8217;ll get an array back as array(&#8216;year&#8217;=&gt;2011, &#8216;month&#8217; =&gt; 6, &#8216;day&#8217; =&gt; 7, &#8216;hour&#8217; =&gt; 4). If you enter 2011-06-07 04:43 you&#8217;ll get: array(&#8216;year&#8217;=&gt;2011, &#8216;month&#8217; =&gt; 6, &#8216;day&#8217; =&gt; 7, &#8216;hour&#8217; =&gt; 4, &#8216;minute&#8217; =&gt; 43), works from just a year all the way to seconds.</p>
<pre>    /**
     * Gets the parts of a date that are set in an ISO date string.
     *
     * @param string $date date/time to use.
     *
     * @return array
     */
    public static function getDateParts($date)
    {
        $matches = array();
        preg_match(
            '/(
                (
                    (
                        (
                            (
                                (?&lt;year&gt;\d{4})
                                (-(?&lt;month&gt;\d{2}))?
                            )
                            (-(?&lt;day&gt;\d{2}))?
                        )
                        (\s?(?&lt;hour&gt;\d{2}))?
                    )
                    (:(?&lt;minute&gt;\d{2}))?
                )
                (:(?&lt;second&gt;\d{2}))?
            )/x',
            $date,
            $matches
        );

        $date = array_map('intval', array_intersect_key($matches, array_flip(array('year', 'month', 'day', 'hour', 'minute', 'second'))));

        return $date;
    }</pre>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/02/26/regex-fu-phpuk2010/' rel='bookmark' title='Regex-fu #PHPUK2010'>Regex-fu #PHPUK2010</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My own PHP Extension Released &#8211; several time savers.</title>
		<link>http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 10:21:27 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=567</guid>
		<description><![CDATA[<p>This weekend I&#8217;ve finished off my first public PHP extension using the (god awful) Zend PHP macro&#8217;s, function calls etc. There were 3 reasons for me doing this:</p>
<p>1) See how difficult it was<br />
2) Create a true library for PHP projects to reduce code repetition across projects.<br />
3) Add some speed to projects that crunch a lot of data in PHP.</p>
<p><a href="http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/#utm_source=feed&#38;utm_medium=feed&#38;utm_campaign=feed" class="more-link">Read more on My own PHP Extension Released &#8211; several time savers&#8230;.</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/' rel='bookmark' title='Regular Expression (Regex) For Date part extraction/array split'>Regular Expression (Regex) For Date part extraction/array split</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/08/22/fk-it-nreallysfw/' rel='bookmark' title='F**k it &#8211; N(really)SFW'>F**k it &#8211; N(really)SFW</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/' rel='bookmark' title='Regular Expression (Regex) For Date part extraction/array split'>Regular Expression (Regex) For Date part extraction/array split</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/08/22/fk-it-nreallysfw/' rel='bookmark' title='F**k it &#8211; N(really)SFW'>F**k it &#8211; N(really)SFW</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This weekend I&#8217;ve finished off my first public PHP extension using the (god awful) Zend PHP macro&#8217;s, function calls etc. There were 3 reasons for me doing this:</p>
<p>1) See how difficult it was<br />
2) Create a true library for PHP projects to reduce code repetition across projects.<br />
3) Add some speed to projects that crunch a lot of data in PHP.</p>
<p>The extension I&#8217;ve released adds the following functions:<br />
<code><br />
<i>/**<br />
* Given a multi line input, removes empty lines and whitespace at the ^ and $ of each line.<br />
* Remove duplicate lines by setting the second param to true.<br />
* Naturally case insensitive sort by setting the third param to true.<br />
*<br />
* @param string $string string to trim.<br />
* @param boolean $unique strip duplicate lines [default: false]<br />
* @param boolean $sort sort returned lines [default: false]<br />
*<br />
* @return string<br />
*/</i><br />
<b>function wadew_multiline_trim($string, $unique = false, $sort = false){}</b></p>
<p><i>/**<br />
* Converts catchable errors to ErrorException objects.<br />
*<br />
* @return void<br />
*/</i><br />
<b>function wadew_register_error_exception_handler(){}</b></p>
<p><i>/**<br />
* Checks all elements of an array to ensure they're all of the required type.<br />
*<br />
* @param array $elements array of objects to check<br />
* @param string $class name of class to match against.<br />
*<br />
* @return boolean<br />
*/</i><br />
<b>function wadew_array_instanceof(array $elements, $class){}</b></p>
<p><i>/**<br />
* Converts a string to its binary MD5 equivalent.<br />
* Same output as md5("string", true) - just faster!<br />
*<br />
* @param string $string string to convert to MD5<br />
*<br />
* @return string<br />
*/</i><br />
<b>function wadew_md5bin($string){}</b></p>
<p><i>/**<br />
* Returns an array of strings by casting to string or calling magic __toString()<br />
*<br />
* @param array $elements elements to convert<br />
*<br />
* @return array<br />
*/</i><br />
<b>function wadew_array_tostring(array $elements){}</b><br />
</code></p>
<p>You can get it from <a href="https://github.com/wadewomersley/wadew_php_extending" target="_blank">https://github.com/wadewomersley/wadew_php_extending</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/' rel='bookmark' title='Regular Expression (Regex) For Date part extraction/array split'>Regular Expression (Regex) For Date part extraction/array split</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/08/22/fk-it-nreallysfw/' rel='bookmark' title='F**k it &#8211; N(really)SFW'>F**k it &#8211; N(really)SFW</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CouchDB ServerDensity Plugin</title>
		<link>http://www.xcitestudios.com/blog/2011/07/09/couchdb-serverdensity-plugin/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2011/07/09/couchdb-serverdensity-plugin/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 10:39:49 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Support]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=564</guid>
		<description><![CDATA[<p>We needed a CouchDB plugin in the office for some of our servers so I wrote one earlier and added it to the Plugin Store over at <a href="http://www.serverdensity.com/">ServerDensity</a>.</p>
<p>You can download it at <a href="http://plugins.serverdensity.com/couchdb/">http://plugins.serverdensity.com/couchdb/</a></p>
<p><a href="http://www.xcitestudios.com/blog/2011/07/09/couchdb-serverdensity-plugin/#utm_source=feed&#38;utm_medium=feed&#38;utm_campaign=feed" class="more-link">Read more on CouchDB ServerDensity Plugin&#8230;</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/03/04/serverdensity-haproxy-plugin/' rel='bookmark' title='ServerDensity HAProxy Plugin'>ServerDensity HAProxy Plugin</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/03/04/serverdensity-haproxy-plugin/' rel='bookmark' title='ServerDensity HAProxy Plugin'>ServerDensity HAProxy Plugin</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>We needed a CouchDB plugin in the office for some of our servers so I wrote one earlier and added it to the Plugin Store over at <a href="http://www.serverdensity.com/">ServerDensity</a>.</p>
<p>You can download it at <a href="http://plugins.serverdensity.com/couchdb/">http://plugins.serverdensity.com/couchdb/</a></p>
<p>It&#8217;s a straight forward plugin that exposes all your databases statistics to SD for monitoring allowing you to fully customise your graphs/alerts.</p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/03/04/serverdensity-haproxy-plugin/' rel='bookmark' title='ServerDensity HAProxy Plugin'>ServerDensity HAProxy Plugin</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2011/07/09/couchdb-serverdensity-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating &#8220;Implemented methods&#8221; for a web based API</title>
		<link>http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 11:11:06 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=556</guid>
		<description><![CDATA[<p>In my <a href="https://twitter.com/#!/leedsphp">leedsphp</a> talk last week I mentioned making a developer (and consumers) life easier by automatically implementing the allow methods functionality that your API may expose (e.g. you call PUT on a URL that only allows GET or POST). I did have an example slide there showing how to implement but I thought I&#8217;d posted a bare bones controller here that shows how it works.</p>
<p><a href="http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/#utm_source=feed&#38;utm_medium=feed&#38;utm_campaign=feed" class="more-link">Read more on Automating &#8220;Implemented methods&#8221; for a web based API&#8230;</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/' rel='bookmark' title='Regular Expression (Regex) For Date part extraction/array split'>Regular Expression (Regex) For Date part extraction/array split</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/' rel='bookmark' title='Regular Expression (Regex) For Date part extraction/array split'>Regular Expression (Regex) For Date part extraction/array split</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In my <a href="https://twitter.com/#!/leedsphp">leedsphp</a> talk last week I mentioned making a developer (and consumers) life easier by automatically implementing the allow methods functionality that your API may expose (e.g. you call PUT on a URL that only allows GET or POST). I did have an example slide there showing how to implement but I thought I&#8217;d posted a bare bones controller here that shows how it works.</p>
<pre style="overflow:auto">abstract class ApiController extends Zend_Rest_Controller
{
    /**
     * Default head action.
     *
     * @internal
     * @return void
     */
    public function headAction()
    {
        ob_start();

        $this-&gt;getAction();

        ob_get_clean();
    }

    /**
     * Default get action.
     *
     * @internal
     * @return void
     */
    public function getAction()
    {
        $this-&gt;_showAllowedMethods();
    }

    /**
     * Default post action.
     *
     * @internal
     * @return void
     */
    public function postAction()
    {
        $this-&gt;_showAllowedMethods();
    }

    /**
     * Default put action.
     *
     * @internal
     * @return void
     */
    public function putAction()
    {
        $this-&gt;_showAllowedMethods();
    }

    /**
     * Default delete action.
     *
     * @internal
     * @return void
     */
    public function deleteAction()
    {
        $this-&gt;_showAllowedMethods();
    }

    /**
     * Allowed methods output.
     *
     * @internal
     * @return void
     */
    private function _showAllowedMethods()
    {
        $methods = $this-&gt;implementedMethods();
        $methods = implode(',', $methods);
        $methods = strtoupper($methods);
        $this-&gt;_response-&gt;setHeader('Allow', $methods);

        $this-&gt;_forward('method-not-allowed', 'error', 'default'); # I have a methodNotAllowedAction on my ErrorController
							           # just for clarity - it does nothing other than headers
    }

    /**
     * Direct call to get implemented methods
     *
     * @internal
     * @return array
     */
    public function implementedMethods()
    {
        if(!isset($this-&gt;_actionController))
            return array();

        $class              = get_class($this-&gt;_actionController);
        $oReflector         = new ReflectionClass($class);
        $methods            = $oReflector-&gt;getMethods(ReflectionMethod::IS_PUBLIC);
        $implementedMethods = array();

        foreach($methods as $i =&gt; $method) /* @var $method ReflectionMethod */
        {
            if($method-&gt;getDeclaringClass()-&gt;getName() == $class)
                $implementedMethods[] = str_replace('Action', '', $method-&gt;getName());
        }

        return array_intersect($implementedMethods, array('get', 'put', 'post', 'delete', 'head', 'options', 'trace'));
    }
}</pre>
<p>If you extend this controller for all your actions, you&#8217;ll get automated Allow headers every time someone calls a URL that does not implement their request type.</p>
<p>As I said in my talk, be sure to use an op-code cache so reflection doesn&#8217;t become your bottleneck!</p>
<p>Also I should mention, this code lives in my ApiController and not in an action helper or similar due to Zend Framework&#8217;s performance hit as a result of using magic methods.</p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2012/02/05/regular-expression-regex-for-date-part-extractionarray-split/' rel='bookmark' title='Regular Expression (Regex) For Date part extraction/array split'>Regular Expression (Regex) For Date part extraction/array split</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#leedsphp talk slides uploaded</title>
		<link>http://www.xcitestudios.com/blog/2011/04/22/leedsphp-talk-slides-uploaded/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2011/04/22/leedsphp-talk-slides-uploaded/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 10:02:19 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=553</guid>
		<description><![CDATA[<p>Finally got around to uploading my slides (sorry for the delay!) for my talk at leedsphp on Monday 18th. They are now available online at <a href="http://www.slideshare.net/wadewomersley/building-a-horizontally-scalable-api-in-php" target="_blank">http://www.slideshare.net/wadewomersley/building-a-horizontally-scalable-api-in-php</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2009/08/31/hello-world/' rel='bookmark' title='Hello world!'>Hello world!</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2009/08/31/hello-world/' rel='bookmark' title='Hello world!'>Hello world!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Finally got around to uploading my slides (sorry for the delay!) for my talk at leedsphp on Monday 18th. They are now available online at <a href="http://www.slideshare.net/wadewomersley/building-a-horizontally-scalable-api-in-php" target="_blank">http://www.slideshare.net/wadewomersley/building-a-horizontally-scalable-api-in-php</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2009/08/31/hello-world/' rel='bookmark' title='Hello world!'>Hello world!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2011/04/22/leedsphp-talk-slides-uploaded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom version of beanstalkd available for download</title>
		<link>http://www.xcitestudios.com/blog/2011/03/06/custom-version-of-beanstalkd-available-for-download/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2011/03/06/custom-version-of-beanstalkd-available-for-download/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 19:06:05 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=544</guid>
		<description><![CDATA[<p>We use beanstalkd at work for our job queue&#8217;s due to its very low memory footprint and speed. However it was missing a few features we needed so I decided to fork it on github and start working on it and I&#8217;m pleased to announce it&#8217;s now available to download. You can grab it at <a href="https://github.com/wadewomersley/beanstalkd-ww">https://github.com/wadewomersley/beanstalkd-ww</a>.</p>
<p><a href="http://www.xcitestudios.com/blog/2011/03/06/custom-version-of-beanstalkd-available-for-download/#utm_source=feed&#38;utm_medium=feed&#38;utm_campaign=feed" class="more-link">Read more on Custom version of beanstalkd available for download&#8230;</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/09/03/todays-musings/' rel='bookmark' title='Today&#8217;s musings'>Today&#8217;s musings</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/09/03/todays-musings/' rel='bookmark' title='Today&#8217;s musings'>Today&#8217;s musings</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>We use beanstalkd at work for our job queue&#8217;s due to its very low memory footprint and speed. However it was missing a few features we needed so I decided to fork it on github and start working on it and I&#8217;m pleased to announce it&#8217;s now available to download. You can grab it at <a href="https://github.com/wadewomersley/beanstalkd-ww">https://github.com/wadewomersley/beanstalkd-ww</a>.</p>
<pre>
 * Added the much needed clear-tube function - removes all but reserved jobs, yes, even buried!
 * Fixed bug in log load where group reload was attempted while not supported.
 * Added removal of group reference from job on group delete
 * Fixed add_job_to_group and a bug in put. Also made put group optional
 * Reduced some unnecessary code from do_stats
 * Optimised do_stats to only recall the fmt function if need be
 * Adding job groups either during the put, using group-create. Also added group-delete to remove a group (does not delete the jobs) and group-stats allowing you to view the status of a group of jobs.
</pre>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/08/14/my-own-php-extension-released-several-time-savers/' rel='bookmark' title='My own PHP Extension Released &#8211; several time savers.'>My own PHP Extension Released &#8211; several time savers.</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/09/03/todays-musings/' rel='bookmark' title='Today&#8217;s musings'>Today&#8217;s musings</a></li>
<li><a href='http://www.xcitestudios.com/blog/2011/04/25/automating-implemented-methods-for-a-web-based-api/' rel='bookmark' title='Automating &#8220;Implemented methods&#8221; for a web based API'>Automating &#8220;Implemented methods&#8221; for a web based API</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2011/03/06/custom-version-of-beanstalkd-available-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hidden Camera Prank &#8211; Little Girl scares people!</title>
		<link>http://www.xcitestudios.com/blog/2011/03/05/hidden-camera-prank-little-girl-scares-people/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2011/03/05/hidden-camera-prank-little-girl-scares-people/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 21:35:20 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Random Stuff]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=541</guid>
		<description><![CDATA[<p>This is the BEST way to scare people, dress a girl up like the girl from The Ring and just get her to stand in a regular hotel hallway. Win!<br />
<object width="540" height="329"><param name="movie" value="http://www.youtube.com/v/roVgJxMiCPY&#038;hl=en_US&#038;feature=player_embedded&#038;version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/roVgJxMiCPY&#038;hl=en_US&#038;feature=player_embedded&#038;version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="540" height="329"></embed></object></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2009/09/08/ancient-dogoo-girl-where-would-be-without-the-japanese/' rel='bookmark' title='Ancient Dogoo Girl &#8211; Where would be without the Japanese?'>Ancient Dogoo Girl &#8211; Where would be without the Japanese?</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/10/04/derren-brown-hypnotises-people-on-the-train/' rel='bookmark' title='Derren Brown Hypnotises people on the train'>Derren Brown Hypnotises people on the train</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/09/04/hidden-things-lack-of-fries-and-pointless-data/' rel='bookmark' title='Hidden things, lack of fries and pointless data'>Hidden things, lack of fries and pointless data</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2009/09/08/ancient-dogoo-girl-where-would-be-without-the-japanese/' rel='bookmark' title='Ancient Dogoo Girl &#8211; Where would be without the Japanese?'>Ancient Dogoo Girl &#8211; Where would be without the Japanese?</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/10/04/derren-brown-hypnotises-people-on-the-train/' rel='bookmark' title='Derren Brown Hypnotises people on the train'>Derren Brown Hypnotises people on the train</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/09/04/hidden-things-lack-of-fries-and-pointless-data/' rel='bookmark' title='Hidden things, lack of fries and pointless data'>Hidden things, lack of fries and pointless data</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is the BEST way to scare people, dress a girl up like the girl from The Ring and just get her to stand in a regular hotel hallway. Win!<br />
<object width="540" height="329"><param name="movie" value="http://www.youtube.com/v/roVgJxMiCPY&#038;hl=en_US&#038;feature=player_embedded&#038;version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/roVgJxMiCPY&#038;hl=en_US&#038;feature=player_embedded&#038;version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="540" height="329"></embed></object></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2009/09/08/ancient-dogoo-girl-where-would-be-without-the-japanese/' rel='bookmark' title='Ancient Dogoo Girl &#8211; Where would be without the Japanese?'>Ancient Dogoo Girl &#8211; Where would be without the Japanese?</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/10/04/derren-brown-hypnotises-people-on-the-train/' rel='bookmark' title='Derren Brown Hypnotises people on the train'>Derren Brown Hypnotises people on the train</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/09/04/hidden-things-lack-of-fries-and-pointless-data/' rel='bookmark' title='Hidden things, lack of fries and pointless data'>Hidden things, lack of fries and pointless data</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2011/03/05/hidden-camera-prank-little-girl-scares-people/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ServerDensity HAProxy Plugin</title>
		<link>http://www.xcitestudios.com/blog/2011/03/04/serverdensity-haproxy-plugin/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2011/03/04/serverdensity-haproxy-plugin/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 14:57:17 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Support]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=528</guid>
		<description><![CDATA[<p>I realised it would be really useful to have a <a href="http://www.serverdensity.com">Server Density</a> plugin that can query HAProxy and report a few stats back about it. So I wrote one! <a href='http://www.xcitestudios.com/blog/wp-content/uploads/2011/03/haproxy1.zip'>haproxy.py</a> plugin for Server Density.</p>
<p><a href="http://www.xcitestudios.com/blog/2011/03/04/serverdensity-haproxy-plugin/#utm_source=feed&#38;utm_medium=feed&#38;utm_campaign=feed" class="more-link">Read more on ServerDensity HAProxy Plugin&#8230;</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/07/09/couchdb-serverdensity-plugin/' rel='bookmark' title='CouchDB ServerDensity Plugin'>CouchDB ServerDensity Plugin</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/02/26/phpuk2010-part-1/' rel='bookmark' title='#PHPUK2010 Part 1'>#PHPUK2010 Part 1</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/11/18/superb-vps-virtual-private-server-provider-vps-net/' rel='bookmark' title='Superb VPS (Virtual Private Server) Provider &#8211; VPS.net Review'>Superb VPS (Virtual Private Server) Provider &#8211; VPS.net Review</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/07/09/couchdb-serverdensity-plugin/' rel='bookmark' title='CouchDB ServerDensity Plugin'>CouchDB ServerDensity Plugin</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/02/26/phpuk2010-part-1/' rel='bookmark' title='#PHPUK2010 Part 1'>#PHPUK2010 Part 1</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/11/18/superb-vps-virtual-private-server-provider-vps-net/' rel='bookmark' title='Superb VPS (Virtual Private Server) Provider &#8211; VPS.net Review'>Superb VPS (Virtual Private Server) Provider &#8211; VPS.net Review</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I realised it would be really useful to have a <a href="http://www.serverdensity.com">Server Density</a> plugin that can query HAProxy and report a few stats back about it. So I wrote one! <a href='http://www.xcitestudios.com/blog/wp-content/uploads/2011/03/haproxy1.zip'>haproxy.py</a> plugin for Server Density.</p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2011/07/09/couchdb-serverdensity-plugin/' rel='bookmark' title='CouchDB ServerDensity Plugin'>CouchDB ServerDensity Plugin</a></li>
<li><a href='http://www.xcitestudios.com/blog/2010/02/26/phpuk2010-part-1/' rel='bookmark' title='#PHPUK2010 Part 1'>#PHPUK2010 Part 1</a></li>
<li><a href='http://www.xcitestudios.com/blog/2009/11/18/superb-vps-virtual-private-server-provider-vps-net/' rel='bookmark' title='Superb VPS (Virtual Private Server) Provider &#8211; VPS.net Review'>Superb VPS (Virtual Private Server) Provider &#8211; VPS.net Review</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2011/03/04/serverdensity-haproxy-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SSL in RestClient</title>
		<link>http://www.xcitestudios.com/blog/2011/03/04/using-ssl-in-restclient/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2011/03/04/using-ssl-in-restclient/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 10:10:48 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Support]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=521</guid>
		<description><![CDATA[<p><a href="http://code.google.com/p/rest-client/">RESTClient</a> is a great little CLI and GUI tool for testing your REST API. I recently pushed a new API  up in the office and it runs over SSL. I tried to test it in the RESTClient and got a PeerNotVerified error from Java. First thing I did was go to the SSL tab in RestClient presuming I could tell it to just trust the API&#8230;apparently not.</p>
<p><a href="http://www.xcitestudios.com/blog/2011/03/04/using-ssl-in-restclient/#utm_source=feed&#38;utm_medium=feed&#38;utm_campaign=feed" class="more-link">Read more on Using SSL in RestClient&#8230;</a></p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2010/01/04/us-toughens-up-on-incoming-planes-from-terror-prone-countries/' rel='bookmark' title='US Toughens up on incoming planes from &#8220;terror-prone&#8221; countries'>US Toughens up on incoming planes from &#8220;terror-prone&#8221; countries</a></li>
</ol></p>
Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2010/01/04/us-toughens-up-on-incoming-planes-from-terror-prone-countries/' rel='bookmark' title='US Toughens up on incoming planes from &#8220;terror-prone&#8221; countries'>US Toughens up on incoming planes from &#8220;terror-prone&#8221; countries</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/rest-client/">RESTClient</a> is a great little CLI and GUI tool for testing your REST API. I recently pushed a new API  up in the office and it runs over SSL. I tried to test it in the RESTClient and got a PeerNotVerified error from Java. First thing I did was go to the SSL tab in RestClient presuming I could tell it to just trust the API&#8230;apparently not.</p>
<p>So after a bit of web scouring about how to get Java to trust your site I came across instructions and thought I&#8217;d re-post here simplified for anyone who needs to query HTTPS from RESTClient.</p>
<p>These instructions are based on <em>Windows 64-bit</em> and Java being installed into <em>C:\Program Files (x86)\Java</em>. So you may have to change a few paths but the core things are the same.</p>
<div style="height: 300px;">
<img class="size-medium wp-image-522  alignright" title="browser_ssl" src="http://www.xcitestudios.com/blog/wp-content/uploads/2011/03/browser_ssl-244x300.png" alt="" width="244" height="300" />Navigate to the website in your browser, click the SSL icon in the address bar and click Certificate Information or Details etc.</p>
<p>In the window that pops up, go to the Details tab then click the &#8220;Copy to File&#8221; button. Click Next until you get to the request for a Filename. Click Browse and navigate to &#8220;C:\Program Files (x86)\Java\jre6\lib\security&#8221;. Enter the filename to save the certificate as (I suggest the domain name with .cer ending). Finally click Next and Finish.
</p></div>
<p>Now open up a command prompt (if you&#8217;ve got Windows security then be sure to run as administrator [right click the shortcut to the command prompt and the option is there]) and enter the following:
<pre>cd "C:\Program Files (x86)\Java\jre6"
bin\keytool.exe -noprompt -import -keystore lib\security\cacerts
     -alias (put_domain_name_here)
     -file lib\security\(name_of_certificate_you_saved_above).cer</pre>
<p>The second command should all be on one line. You&#8217;ll get asked for a password, if you&#8217;ve never touched any Java passwords on your machine before, it&#8217;ll probably be the certificate store default which is either <em>changeit</em> or <em>changeme</em>.</p>
<p>That&#8217;s it! You should now be able to query your service using HTTPS without any errors.</p>
<p>Related posts:<ol>
<li><a href='http://www.xcitestudios.com/blog/2010/01/04/us-toughens-up-on-incoming-planes-from-terror-prone-countries/' rel='bookmark' title='US Toughens up on incoming planes from &#8220;terror-prone&#8221; countries'>US Toughens up on incoming planes from &#8220;terror-prone&#8221; countries</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2011/03/04/using-ssl-in-restclient/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Glee does Rocky Horror!</title>
		<link>http://www.xcitestudios.com/blog/2010/10/13/glee-does-rocky-horror/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.xcitestudios.com/blog/2010/10/13/glee-does-rocky-horror/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 16:36:06 +0000</pubDate>
		<dc:creator>Wade</dc:creator>
				<category><![CDATA[Holidays]]></category>
		<category><![CDATA[Random Stuff]]></category>

		<guid isPermaLink="false">http://www.xcitestudios.com/blog/?p=510</guid>
		<description><![CDATA[<p>I must confess, I love Glee and for some reason after season one I stopped watching &#8211; must catch up on it. So how do you make a show like Glee even better? Simple, get them to do a Rocky Horror episode!</p>
<p><a href="http://www.xcitestudios.com/blog/2010/10/13/glee-does-rocky-horror/#utm_source=feed&#38;utm_medium=feed&#38;utm_campaign=feed" class="more-link">Read more on Glee does Rocky Horror!&#8230;</a></p>
<p>No related posts.</p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I must confess, I love Glee and for some reason after season one I stopped watching &#8211; must catch up on it. So how do you make a show like Glee even better? Simple, get them to do a Rocky Horror episode!</p>
<p><object width="580" height="320"><param name="movie" value="http://www.youtube.com/v/QES9mil1VVE&#038;hl=en_US&#038;feature=player_embedded&#038;version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/QES9mil1VVE&#038;hl=en_US&#038;feature=player_embedded&#038;version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="580" height="320"></embed></object></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.xcitestudios.com/blog/2010/10/13/glee-does-rocky-horror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>


<!-- W3 Total Cache: Minify debug info:
Engine:             disk: basic
Theme:              f1453
Template:           index
-->
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.xcitestudios.com @ 2012-02-06 13:05:25 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          blog/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      0.748s
Header info:
Expires:            Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control:      no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma:             no-cache
X-Pingback:         http://www.xcitestudios.com/blog/xmlrpc.php
ETag:               "998bb9d66a46a01ba1825baf8606c801"
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Mon, 06 Feb 2012 13:05:25 GMT
Vary:               Accept-Encoding, Cookie
X-Powered-By:       W3 Total Cache/0.9.2.4
Content-Encoding:   gzip
-->
