<?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>Billy&#039;s Blog of Geekery</title>
	<atom:link href="http://geekery.the-kid.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekery.the-kid.org</link>
	<description>I want to change the world but they won&#039;t give me the source code.</description>
	<lastBuildDate>Tue, 15 May 2012 10:11:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Evening Depress</title>
		<link>http://geekery.the-kid.org/2012/05/04/evening-depress/</link>
		<comments>http://geekery.the-kid.org/2012/05/04/evening-depress/#comments</comments>
		<pubDate>Fri, 04 May 2012 16:11:24 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[My Scripts]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=1194</guid>
		<description><![CDATA[Following in the steps of the Pish &#038; Churnal and Empty News scripts, I offer today&#8217;s Evening Depress&#8230; The download link below should ask to install it in chrome, if you&#8217;re using Firefox you&#8217;ll need Greasemonkey to run it. Install then head on over to the Evening Depress site&#8230; Download (Downloaded 16 times) Tweet]]></description>
			<content:encoded><![CDATA[<p>Following in the steps of the <a href="http://geekery.the-kid.org/2011/09/11/pee-and-what-now/" title="Pee and what now?">Pish &#038; Churnal</a> and <a href="http://geekery.the-kid.org/2011/09/18/nt-news/" title="NT News">Empty News</a> scripts, I offer today&#8217;s Evening Depress&#8230;</p>
<p><a href="http://geekery.the-kid.org/files/2012/05/ss_001.png" rel="lightbox[1194]"><img src="http://geekery.the-kid.org/files/2012/05/ss_001-183x300.png" alt="Evening Depress screenshot" title="when your day&#039;s been just too jolly, depress yourself..." width="183" height="300" class="aligncenter size-medium wp-image-1195" /></a></p>
<p>The download link below should ask to install it in chrome, if you&#8217;re using Firefox you&#8217;ll need <a href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/">Greasemonkey</a> to run it. Install then head on over to the <a href="http://www.eveningexpress.co.uk/Article.aspx/2755938">Evening Depress</a> site&#8230;</p>
<p><a href="http://geekery.the-kid.org/downloads/eveningdepress">Download</a> (Downloaded 16 times)</p>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2012/05/04/evening-depress/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Evening Depress" data-url="http://geekery.the-kid.org/2012/05/04/evening-depress/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2012/05/04/evening-depress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rotate elements jQuery bookmarklet</title>
		<link>http://geekery.the-kid.org/2012/04/07/rotate-elements-jquery-bookmarklet/</link>
		<comments>http://geekery.the-kid.org/2012/04/07/rotate-elements-jquery-bookmarklet/#comments</comments>
		<pubDate>Sat, 07 Apr 2012 22:28:00 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[My Scripts]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=1178</guid>
		<description><![CDATA[Ever seen when someone&#8217;s uploaded an image or a video shot on their iPhone or uploaded badly so that it&#8217;s displaying sideways or upside-down online? Yeah I have too. It&#8217;s annoying trying to crick your neck just to view the object. Hence this bookmarklet(drag the &#8220;&#8629;&#8221; link to your bookmark bar)&#8230; Each click on the &#8230; </p><p><a class="more-link block-button" href="http://geekery.the-kid.org/2012/04/07/rotate-elements-jquery-bookmarklet/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Ever seen when someone&#8217;s uploaded an image or a video shot on their iPhone or uploaded badly so that it&#8217;s displaying sideways or upside-down online? Yeah I have too. It&#8217;s annoying trying to crick your neck just to view the object. Hence this bookmarklet(drag the &#8220;&crarr;&#8221; link to your bookmark bar)&#8230;<br />
Each click on the element after you&#8217;ve activated the bookmarklet will rotate it clockwise by 90 degrees. Try it out now, click the link below, after clicking OK click on this paragraph. and again, and again&#8230; not bad eh!?</p>
<div style="text-align:center;font-size:2em;"><a href="javascript:(function(){var s = document.createElement('script');s.src = 'http://code.jquery.com/jquery-1.7.2.min.js';document.body.appendChild(s);var s = document.createElement('script');s.src = 'http://the-kid.org/scripts/rotateElements.js';document.body.appendChild(s);})();">&crarr;</a></div>
<pre name="code" class="HTML">&lt;a href="javascript:(function(){var s = document.createElement('script');s.src = 'http://code.jquery.com/jquery-1.7.2.min.js';document.body.appendChild(s);var s = document.createElement('script');s.src = 'http://the-kid.org/scripts/rotateElements.js';document.body.appendChild(s);})();"&gt;&crarr;&lt;/a&gt;</pre>
<p>The eagle-eyed among you will note that this loads a couple of scripts remotely. Firstly it loads jQuery from the official jQuery CDN. This is so I can access some framework dependant functionality surrounding rotating elements, used by the second script the bookmarklet loads (<a href="http://the-kid.org/scripts/rotateElements.js">here is the script</a> the top bit is the <a href="http://code.google.com/p/jqueryrotate/">jQueryrotate plugin</a> just embedded into the script)</p>
<p>The important bits are the line in the second file&#8230; </p>
<pre name="code" class="javascript">
var rotation = -90;
    function assignElement()
    {
        alert("Click target element");
        $(document).ready(function(){
            $("*").click(function(event){
                elementSelect = event.target;
                $("*").unbind("click");
                elSel(elementSelect);
            });
        });
    }
    function elSel(elementSelect)
    {
        $(elementSelect).click(function(){
            if(rotation<360)rotation += 90;
            else rotation=0;
            $(elementSelect).rotate({
                bind:{
                    click: function(){
                        $(this).rotate({ angle:0,animateTo:rotation,easing: $.easing.easeInOutExpo })
                    }
                }
            });
        })
    }
    assignElement();
</pre>
<p>The assignElement() function defines exactly what you want to rotate on the page, the elSel() function binds the rotation to clicks on the element.<br />
It's very hack-ish(and feels it!) but it works somewhat. Sometimes you need to click two or three times on the element to get it rotating, probably because of how I've nested the elSel() function.</p>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2012/04/07/rotate-elements-jquery-bookmarklet/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Rotate elements jQuery bookmarklet" data-url="http://geekery.the-kid.org/2012/04/07/rotate-elements-jquery-bookmarklet/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2012/04/07/rotate-elements-jquery-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back to top bookmarklet(s)</title>
		<link>http://geekery.the-kid.org/2012/03/06/back-to-top-bookmarklet/</link>
		<comments>http://geekery.the-kid.org/2012/03/06/back-to-top-bookmarklet/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 11:25:42 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[My Scripts]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=1152</guid>
		<description><![CDATA[How annoying is it when a page induces an infinite scroll technique or is just long and they don&#8217;t provide you with a mechanism to get back to the top of the page? (that&#8217;s rhetorical but the answer is &#8220;quite&#8221;!) Here&#8217;s a simple-tastic bookmarklet(drag the &#8220;&#8593;&#8221; link to your bookmark bar) so everywhere can have &#8230; </p><p><a class="more-link block-button" href="http://geekery.the-kid.org/2012/03/06/back-to-top-bookmarklet/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>How annoying is it when a page induces an infinite scroll technique or is just long and they don&#8217;t provide you with a mechanism to get back to the top of the page? (that&#8217;s rhetorical but the answer is &#8220;quite&#8221;!)</p>
<p>Here&#8217;s a simple-tastic bookmarklet(drag the &#8220;&uarr;&#8221; link to your bookmark bar) so everywhere can have it&#8230;</p>
<div style="text-align:center;font-size:2em;"><a href="javascript:window.scroll(0,0);" onclick="window.scroll(0,0);">&uarr;</a></div>
<pre name="code" class="HTML">&lt;a href="javascript:window.scroll(0,0);" onclick="window.scroll(0,0);"&gt;&amp;uarr;&lt;/a&gt;</pre>
<p>[edit]<br />
<a target="_blank" href="http://twitter.com/Mitchinator/status/177146952289501184">Mitchinator</a> suggested I make a jQuery enabled version for some smoothness. So here we go&#8230; falls back to instant if page isn&#8217;t jQuery enabled&#8230;</p>
<div style="text-align:center;font-size:2em;"><a href="javascript:if(typeof jQuery === 'undefined' || !jQuery) {window.scroll(0,0);}else{jQuery('body').animate({scrollTop:0}, 1200);}" onclick="if(typeof jQuery === 'undefined' || !jQuery) {window.scroll(0,0);}else{jQuery('body').animate({scrollTop:0}, 1200);}">&uarr;</a></div>
<pre name="code" class="HTML">&lt;a href="javascript:if(typeof jQuery === 'undefined' || !jQuery) {window.scroll(0,0);}else{jQuery('body').animate({scrollTop:0}, 1200);}" onclick="if(typeof jQuery === 'undefined' || !jQuery) {window.scroll(0,0);}else{jQuery('body').animate({scrollTop:0}, 1200);}"&gt;&amp;uarr;&lt;/a&gt;</pre>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2012/03/06/back-to-top-bookmarklet/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Back to top bookmarklet(s)" data-url="http://geekery.the-kid.org/2012/03/06/back-to-top-bookmarklet/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2012/03/06/back-to-top-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AMV files in Linux &#8211; revisited</title>
		<link>http://geekery.the-kid.org/2011/09/20/amv-files-in-linux-revisited/</link>
		<comments>http://geekery.the-kid.org/2011/09/20/amv-files-in-linux-revisited/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 01:26:35 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[My Scripts]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=967</guid>
		<description><![CDATA[I just did a re-write of one of my most popular hits on this blog. It was all documented in the comments of the script&#8217;s page but it&#8217;s a bit of a mess so here&#8217;s the definitive step-by-step walkthrough to converting your videos to AMV format in Linux (I use Ubuntu 10.04) If you can&#8217;t &#8230; </p><p><a class="more-link block-button" href="http://geekery.the-kid.org/2011/09/20/amv-files-in-linux-revisited/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I just did a re-write of one of my most popular hits on this blog. It was all documented in <a href="http://geekery.the-kid.org/myscripts/linux-avi-amv-converter/#comments">the comments</a> of the script&#8217;s page but it&#8217;s a bit of a mess so here&#8217;s the definitive step-by-step walkthrough to converting your videos to AMV format in Linux (I use Ubuntu 10.04) If you can&#8217;t make out the pictures in this post click on them to make them bigger &#8211; remember, they&#8217;re only pictures, not real dialog windows&#8230; ;oP</p>
<ol>
<li>Open a terminal window</li>
<li><code>sudo apt-get install subversion<br />
svn checkout http://amv-codec-tools.googlecode.com/svn/trunk/ amv-codec-tools<br />
cd amv-codec-tools/AMVmuxer<br />
make build<br />
</code>Allow this to finish, it takes a good few minutes</li>
<li><code>sudo apt-get install nautilus-actions</code></li>
<li><code>cd<br />
gedit</code></li>
<li>Paste the following code into that file<br />
<code>#!/bin/bash<br />
for uri in $@; do<br />
    INFILE=$uri<br />
    FORMAT=${INFILE:(-4)}<br />
    OUTFILE=${INFILE/$FORMAT/.amv}<br />
    cd ~/amv-codec-tools/AMVmuxer ;<br />
    ./ffmpeg/ffmpeg -i "$INFILE" -f amv -r 16 -s 160x120 -ac 1 -ar 22050 -qmin 3 -qmax 3 "$OUTFILE" ;<br />
    zenity --title "$FORMAT to .amv File Conversion Complete" --info --text="${INFILE/file:\/\// } has converted \n\nCheck ${OUTFILE/file:\/\// }";<br />
done</code><br />
&#8230;save file as &#8216;convert to amv&#8217; and close the file</li>
<li>back in the terminal&#8230;<code>nautilus-actions-config-tool</code></li>
<li>In the window that pops up, click new and make it look like this (don&#8217;t worry about the shred file and wipe free space stuff, we&#8217;re only interested in the Convert to amv stuff):<a href="http://geekery.the-kid.org/files/2011/09/ss-143.png" rel="lightbox[967]"><img src="http://geekery.the-kid.org/files/2011/09/ss-143-300x155.png" alt="" title="nautilus-actions-config-tool" width="300" height="155" class="aligncenter size-medium wp-image-975" /></a><br/><a href="http://geekery.the-kid.org/files/2011/09/ss-144.png" rel="lightbox[967]"><img src="http://geekery.the-kid.org/files/2011/09/ss-144-300x155.png" alt="" title="nautilus-actions-config-tool" width="300" height="155" class="aligncenter size-medium wp-image-978" /></a><br/><a href="http://geekery.the-kid.org/files/2011/09/ss-145.png" rel="lightbox[967]"><img src="http://geekery.the-kid.org/files/2011/09/ss-145-300x155.png" alt="" title="nautilus-actions-config-tool" width="300" height="155" class="aligncenter size-medium wp-image-979" /></a><br/><a href="http://geekery.the-kid.org/files/2011/09/ss-146.png" rel="lightbox[967]"><img src="http://geekery.the-kid.org/files/2011/09/ss-146-300x155.png" alt="" title="nautilus-actions-config-tool" width="300" height="155" class="aligncenter size-medium wp-image-981" /></a>note the different tabs that are open, also note where quotation marks have been used</li>
<li>Save the configuration</li>
<li>Close the nautilus actions configuration tool window</li>
<li>Close the terminal window</li>
<li>In nautilus navigate to a file you want converted</li>
<li>Right click on it, you should see this menu item<a href="http://geekery.the-kid.org/files/2011/09/ss-147.png" rel="lightbox[967]"><img src="http://geekery.the-kid.org/files/2011/09/ss-147-300x219.png" alt="" title="New menu item!" width="300" height="219" class="aligncenter size-medium wp-image-983" /></a>go ahead and select that</li>
<li>After some time, how long depends on the size of the file, you&#8217;ll get a dialog box looking something like this<a href="http://geekery.the-kid.org/files/2011/09/ss-148.png" rel="lightbox[967]"><img src="http://geekery.the-kid.org/files/2011/09/ss-148-300x114.png" alt="" title="complete" width="300" height="114" class="aligncenter size-medium wp-image-984" /></a></li>
<li>Go ahead and play the file (I use GNOME MPlayer for amv files &#8220;sudo apt-get install gnome-mplayer&#8221; but vlc plays them too. You may need codecs.)<a href="http://geekery.the-kid.org/files/2011/09/ss-155.png" rel="lightbox[967]"><img src="http://geekery.the-kid.org/files/2011/09/ss-155.png" alt="" title="AMV playing" width="166" height="201" class="aligncenter size-full wp-image-985" /></a></li>
</ol>
<p>Hopefully that&#8217;ll be you sorted but there are a few points to note&#8230;</p>
<ol>
<li>Spaces in file or path names &#8211; it can&#8217;t handle them</li>
<li>You can do multiple files on the one click, it&#8217;ll do them one at a time</li>
<li>Some file types won&#8217;t convert without messing with ffmpeg &#8211; notably mp4/mp3/3gp &#8211; these can be made to work but that&#8217;s outside the scope of this, importantly flv files convert perfectly so your youtube downloads will work ;oP</li>
<li>This was written using Ubuntu &#8211; I can&#8217;t be certain it&#8217;ll work with other distros</li>
</ol>
<p>go stick your amv files onto your iteddy or ipod-esque thingy and play to your hearts content!</p>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2011/09/20/amv-files-in-linux-revisited/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="AMV files in Linux - revisited" data-url="http://geekery.the-kid.org/2011/09/20/amv-files-in-linux-revisited/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2011/09/20/amv-files-in-linux-revisited/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NT News</title>
		<link>http://geekery.the-kid.org/2011/09/18/nt-news/</link>
		<comments>http://geekery.the-kid.org/2011/09/18/nt-news/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 00:05:52 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[My Scripts]]></category>
		<category><![CDATA[Requests]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=963</guid>
		<description><![CDATA[In a similar vein to my last post I&#8217;ve had a request from my very dear friend @Rantz to do something along the same lines for the Northern Territory&#8217;s favourite chip-wrapper. So I did&#8230; If anyone else would like their own piss-take re-branding of a site they like/loath feel free to drop me a line &#8230; </p><p><a class="more-link block-button" href="http://geekery.the-kid.org/2011/09/18/nt-news/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>In a similar vein to <a href="http://geekery.the-kid.org/2011/09/11/pee-and-what-now/" title="pee and what now" target="_blank">my last post</a> I&#8217;ve had a request from my very dear friend <a href="http://twitter.com/rantz" title="Rantz's tweetage" target="_blank">@Rantz</a> to do something along the same lines for the Northern Territory&#8217;s favourite chip-wrapper.</p>
<p>So I did&#8230;</p>
<p><a href="http://geekery.the-kid.org/files/2011/09/ss-140.png" rel="lightbox[963]"><img src="http://geekery.the-kid.org/files/2011/09/ss-140-262x300.png" alt="" title="empty chip wrapper?" width="262" height="300" class="aligncenter size-medium wp-image-964" /></a></p>
<p>If anyone else would like their own piss-take re-branding of a site they like/loath feel free to drop me a line but for now here&#8217;s the  NT News version&#8230;<br />
<a href="http://geekery.the-kid.org/downloads/mtnews">Download</a> (Downloaded 126 times)</p>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2011/09/18/nt-news/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="NT News" data-url="http://geekery.the-kid.org/2011/09/18/nt-news/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2011/09/18/nt-news/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pee and what now?</title>
		<link>http://geekery.the-kid.org/2011/09/11/pee-and-what-now/</link>
		<comments>http://geekery.the-kid.org/2011/09/11/pee-and-what-now/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 22:22:41 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[My Scripts]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=950</guid>
		<description><![CDATA[I&#8217;ve created a quick tongue in cheek user script to help folks remember what the P&#38;J is all about. Install it and navigate to any P&#38;J page&#8230; Download (Downloaded 267 times) The download link should ask to install it on Chrome. In Firefox with Greasemonkey installed it should show the script with a button on &#8230; </p><p><a class="more-link block-button" href="http://geekery.the-kid.org/2011/09/11/pee-and-what-now/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a quick tongue in cheek user script to help folks remember what the P&amp;J is all about. Install it and navigate to <a href="http://pressandjournal.co.uk" target="_blank">any P&amp;J page</a>&#8230;</p>
<p><a href="http://geekery.the-kid.org/files/2011/09/ss-135.png" rel="lightbox[950]"><img src="http://geekery.the-kid.org/files/2011/09/ss-135-216x300.png" alt="" title="Pee and Chay?" width="216" height="300" class="aligncenter size-medium wp-image-961" /></a></p>
<p><a href="http://geekery.the-kid.org/downloads/peeandjay">Download</a> (Downloaded 267 times)</p>
<p>The download link should ask to install it on Chrome.<br />
In Firefox with <a title="Greasemonkey" href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/" target="_blank">Greasemonkey</a> installed it should show the script with a button on the top right to install.<br />
If that above doesn&#8217;t happen save it to the desktop then drag it onto an open firefox window and greasemonkey should sort it out then.</p>
<p>(update 1/Feb/2012 now changes the words from page body too(on any site [<a href="http://p.twimg.com/AkkV7fBCIAAbz5Q.png:large" target="_blank">screenshot</a>]))</p>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2011/09/11/pee-and-what-now/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Pee and what now?" data-url="http://geekery.the-kid.org/2011/09/11/pee-and-what-now/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2011/09/11/pee-and-what-now/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Custom smilies</title>
		<link>http://geekery.the-kid.org/2011/08/29/custom-smilies/</link>
		<comments>http://geekery.the-kid.org/2011/08/29/custom-smilies/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 13:54:34 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[My Scripts]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=942</guid>
		<description><![CDATA[{EAV_BLOG_VER:6e99e91f183f7014} I use my own smilies around the web but I always forget the full link to the pics whenever I&#8217;m posting to a forum or whatever. I don&#8217;t need to remember them though as a long time ago I made the script below, saved it as index.php and put it in the folder where &#8230; </p><p><a class="more-link block-button" href="http://geekery.the-kid.org/2011/08/29/custom-smilies/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><span id="empireavenue-claim" style="display:none;">{EAV_BLOG_VER:6e99e91f183f7014}</span><br />
I use my own smilies around the web but I always forget the full link to the pics whenever I&#8217;m posting to a forum or whatever. I don&#8217;t need to remember them though as a long time ago I made the script below, saved it as index.php and put it in the folder where I hold my smilies&#8230; Now I just click a bookmark and open <a href="http://the-kid.org/images/smilies/" target="_blank">that page</a> for a quick copy/paste. Feel free to use for your own uses, it&#8217;s essentially making a list of files in the directory and displaying them as per the html in the echo statements&#8230;<br />
<img src='http://the-kid.org/images/smilies/laugh.gif'/><img src='http://the-kid.org/images/smilies/embarassed.gif'/><img src='http://the-kid.org/images/smilies/grin.gif'/><img src='http://the-kid.org/images/smilies/undecided.gif'/><img src='http://the-kid.org/images/smilies/lipsrsealed.gif'/><img src='http://the-kid.org/images/smilies/rolleyes.gif'/><img src='http://the-kid.org/images/smilies/cheesy.gif'/><img src='http://the-kid.org/images/smilies/wink.gif'/><img src='http://the-kid.org/images/smilies/kiss.gif'/><img src='http://the-kid.org/images/smilies/cry.gif'/><img src='http://the-kid.org/images/smilies/sad.gif'/><img src='http://the-kid.org/images/smilies/shocked.gif'/><img src='http://the-kid.org/images/smilies/angry.gif'/><img src='http://the-kid.org/images/smilies/cool.gif'/><img src='http://the-kid.org/images/smilies/tongue.gif'/><img src='http://the-kid.org/images/smilies/huh.gif'/><img src='http://the-kid.org/images/smilies/smiley.gif'/></p>
<pre name="code" class="PHP">
&lt;script>
function SelectAll(element)
{
element.focus();
element.select();
}
&lt;/script>
&lt;?php
    $path = getcwd() ;
    $dir_handle = @opendir($path) or die("Error opening $path");
    echo "&lt;table style='text-align:center;font-family:sans-serif;'>&lt;tr>&lt;th>Image&lt;/th>&lt;th>Web Link&lt;/th>&lt;th>Forum Link&lt;/th>&lt;th>Image&lt;/th>&lt;/tr>\n";
    while ($file = readdir($dir_handle)) {
	    if ("$file" != "." &#038;&#038; "$file" != ".." &#038;&#038; "$file" != "index.php") {
			echo "&lt;tr>&lt;td>&lt;a href=\"http://the-kid.org/images/smilies/".htmlspecialchars(urlencode($file))." \">&lt;img src=\"".htmlspecialchars(urlencode($file))."\" />&lt;/a>&lt;/td>";
			echo "&lt;td>&lt;input onClick=\"SelectAll(this);\" size=\"50\" type=\"text\" value=\"&lt;img src='http://the-kid.org/images/smilies/".htmlspecialchars(urlencode($file))."'/>\" />&lt;/td>";
			echo "&lt;td>&lt;input onClick=\"SelectAll(this);\" size=\"50\" type=\"text\" value=\"[img]http://the-kid.org/images/smilies/".htmlspecialchars(urlencode($file))."[/img]\" />&lt;/td>
			&lt;td>&lt;a href=\"http://the-kid.org/images/smilies/".htmlspecialchars(urlencode($file))." \">&lt;img src=\"".htmlspecialchars(urlencode($file))."\" />&lt;/a>&lt;/td>
			&lt;/tr>\n";
    	}
    }
    echo "&lt;/table>";
    closedir($dir_handle);
?>
</pre>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2011/08/29/custom-smilies/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Custom smilies" data-url="http://geekery.the-kid.org/2011/08/29/custom-smilies/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2011/08/29/custom-smilies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make a simple web proxy in PHP</title>
		<link>http://geekery.the-kid.org/2011/08/21/how-to-make-a-simple-web-proxy-in-php/</link>
		<comments>http://geekery.the-kid.org/2011/08/21/how-to-make-a-simple-web-proxy-in-php/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 21:17:07 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[My Scripts]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=925</guid>
		<description><![CDATA[I recently tried to follow this link and was met with the equivalent of a 403! I was like, &#8220;I&#8217;m not having that!&#8221; and was about to turn on my VPN when I thought, &#8220;my webserver&#8217;s located in the states, why not just make a proxy?&#8221; So I did a very, very, simple web proxy&#8230; &#8230; </p><p><a class="more-link block-button" href="http://geekery.the-kid.org/2011/08/21/how-to-make-a-simple-web-proxy-in-php/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I recently tried to follow <a target="_balnk" href="http://www.bbc.com/travel/blog/20110811-space-travel-powered-by-helium-balloon">this link</a> and was met with the equivalent of a 403!</p>
<p><a href="http://geekery.the-kid.org/files/2011/08/ss-127.png" rel="lightbox[925]"><img src="http://geekery.the-kid.org/files/2011/08/ss-127-300x163.png" alt="" title="Denied!" width="300" height="163" class="aligncenter size-medium wp-image-926" /></a></p>
<p>I was like, &#8220;I&#8217;m not having that!&#8221; and was about to turn on my VPN when I thought, &#8220;my webserver&#8217;s located in the states, why not just make a proxy?&#8221;</p>
<p>So I did a very, <strong>very</strong>, simple web proxy&#8230;</p>
<pre name='code' class='php'>
&lt;!doctype html>
&lt;html lang="en">
    &lt;head>
        &lt;meta charset="utf-8">
        &lt;title>BTK's Web Proxy&lt;/title>
    &lt;/head>
    &lt;body>
        &lt;div style="text-align:center;">
            &lt;form method="GET" action="&lt;?=$_SERVER['REQUEST_URI']?>">
                &lt;input type="url" name="url" placeholder="Type URL of site"/>&lt;input type="submit" Value="Load url" />
            &lt;/form>
        &lt;/div>
        &lt;hr/>
        &lt;?php
            $url = $_GET['url'];
            if (!empty($url))
            {
                // check we're only getting files served by a website (i.e. not ../../../passwords.txt from this server etc.)
                if(preg_match('/^https?:/i', $url))
                {
                    $contents = file_get_contents($url);
                    if($contents === FALSE)
                    {
                        echo "&lt;h2>Sorry &lt;pre>{$url}&lt;/pre> cannot be read&lt;/h2>\n";
                    }
                    //display contents of url
                    else
                    { ?>
                        &lt;?=$contents?>
                        &lt;script>for (var i=0; i&lt;document.links.length; i++) document.links[i].href="&lt;?=$_SERVER['PHP_SELF']?>?url="+document.links[i].href;&lt;/script>
                    &lt;?php }
                }
                else
                {
                    echo "&lt;h2>&lt;pre>$url&lt;/pre> is an invalid URL&lt;/h2>\n";
                }
            }
        ?>
    &lt;/body>
&lt;/html>
</pre>
<p>Essentially this is a form that takes an url and displays the contents of the url. Using html5 we have the input type of &#8220;url&#8221; which handles our validating, though as this is down to the support of the client(non-supporting clients render this as a type=&#8221;text&#8221; field and do no validation) we have some validation on the server too. There&#8217;s also nothing to stop someone just editing the page URL in their address bar to try to access a local file etc.</p>
<p>So now I can <a href="http://geekery.the-kid.org/bbc.php?url=http%3A%2F%2Fwww.bbc.com%2Ftravel%2Fblog%2F20110811-space-travel-powered-by-helium-balloon" target="_blank">see the restricted content</a>. Result!</p>
<p>I added a little javascript for ease to rewrite all the links, so you can click through and have the pages parsed by the web proxy.</p>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2011/08/21/how-to-make-a-simple-web-proxy-in-php/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="How to make a simple web proxy in PHP " data-url="http://geekery.the-kid.org/2011/08/21/how-to-make-a-simple-web-proxy-in-php/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2011/08/21/how-to-make-a-simple-web-proxy-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to move Firebug to bottom of Firefox browser window</title>
		<link>http://geekery.the-kid.org/2011/08/19/how-to-move-firebug-to-bottom-of-firefox-browser-window/</link>
		<comments>http://geekery.the-kid.org/2011/08/19/how-to-move-firebug-to-bottom-of-firefox-browser-window/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 09:47:41 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[Other Computery Things]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=922</guid>
		<description><![CDATA[A recent update to firebug moved the icon to open the console to the top right of firefox. Everyone hates it as far as I am aware and there&#8217;s no setting to alter it. However you can do the following&#8230; Right-click in the bottom bar or near the firebug icon to get a menu Select &#8230; </p><p><a class="more-link block-button" href="http://geekery.the-kid.org/2011/08/19/how-to-move-firebug-to-bottom-of-firefox-browser-window/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>A recent update to firebug moved the icon to open the console to the top right of firefox. Everyone hates it as far as I am aware and there&#8217;s no setting to alter it. However you can do the following&#8230;</p>
<ol>
<li>Right-click in the bottom bar or near the firebug icon to get a menu</li>
<li>Select &#8220;Customise&#8230;&#8221;</li>
<li>Ignoring the window that pops up, drag the firebug icon to the bottom pane</li>
<li>Click &#8220;Done&#8221; in the window that popped up</li>
</ol>
<p>&#8230;you&#8217;re welcome!</p>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2011/08/19/how-to-move-firebug-to-bottom-of-firefox-browser-window/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="How to move Firebug to bottom of Firefox browser window" data-url="http://geekery.the-kid.org/2011/08/19/how-to-move-firebug-to-bottom-of-firefox-browser-window/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2011/08/19/how-to-move-firebug-to-bottom-of-firefox-browser-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Random Letter Function</title>
		<link>http://geekery.the-kid.org/2011/08/03/php-random-letter-function/</link>
		<comments>http://geekery.the-kid.org/2011/08/03/php-random-letter-function/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 03:01:52 +0000</pubDate>
		<dc:creator>billy</dc:creator>
				<category><![CDATA[My Scripts]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://geekery.the-kid.org/?p=919</guid>
		<description><![CDATA[I think the title says it best. A simple php function to produce a random letter or string of random letters&#8230; function randLetter($howMany=1) { for($i=0;$i]]></description>
			<content:encoded><![CDATA[<p>I think the title says it best. A simple php function to produce a random letter or string of random letters&#8230;</p>
<pre name='code' class='php'>
function randLetter($howMany=1)
{
    for($i=0;$i<$howMany;$i++)
    {
        if (rand(0,1)) $randStr .= chr(rand(97,122));
        else $randStr .= chr(rand(65, 90));
    }
    return $randStr;
}
</pre>
<div class="googlePlusOneButton"><div class="g-plusone" data-href="http://geekery.the-kid.org/2011/08/03/php-random-letter-function/"  size="medium"   ></div></div>
	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="PHP Random Letter Function" data-url="http://geekery.the-kid.org/2011/08/03/php-random-letter-function/"  data-via="billythekid">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://geekery.the-kid.org/2011/08/03/php-random-letter-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

