<?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>micolous.id.au</title>
	<atom:link href="http://micolous.id.au/feed/" rel="self" type="application/rss+xml" />
	<link>http://micolous.id.au</link>
	<description>the result of a blogging accident</description>
	<lastBuildDate>Sun, 29 Aug 2010 08:04:50 +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>portal2 API v2.8.3</title>
		<link>http://micolous.id.au/archives/2010/08/24/portal2-api-v2-8-3/</link>
		<comments>http://micolous.id.au/archives/2010/08/24/portal2-api-v2-8-3/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:10:40 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Lanning]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=323</guid>
		<description><![CDATA[There&#8217;s been a minor change to the portal2 API as of v2.8.3 (to be deployed at LAN 10.09).  Functions which attempt to identify you (usage, usage_history and whoami) will attempt to use cookie-based authentication before attempting to identify your computer by MAC address.
This will allow in-browser applications to determine the identity of who you [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been a minor change to the <a href="/projects/portal2/portal2_api/">portal2 API</a> as of v2.8.3 (to be deployed at LAN 10.09).  Functions which attempt to identify you (<code>usage</code>, <code>usage_history</code> and <code>whoami</code>) will attempt to use cookie-based authentication before attempting to identify your computer by MAC address.</p>
<p>This will allow in-browser applications to determine the identity of who you are logged in as before attempting to fall back to who owns the computer.</p>
<p>In other news, portal2 v2.8.3 now has a couple of other changes to it, such as support for clustering and a new graph on the usage page which is generated client side (and much faster than the server-side graph).</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/08/24/portal2-api-v2-8-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powering StreetGeek 0&#215;00: The Network</title>
		<link>http://micolous.id.au/archives/2010/08/11/powering-streetgeek-0x00/</link>
		<comments>http://micolous.id.au/archives/2010/08/11/powering-streetgeek-0x00/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 12:00:28 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Powering StreetGeek]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=298</guid>
		<description><![CDATA[I&#8217;m going to be working on a new series of blog posts with Firstyear in which we&#8217;re going to discuss a lot of StreetGeek&#8217;s network and server infrastructure.  Information about this is around the place (or you can ask us), but we would talk about more publicly about what goes into making a &#8220;medium&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to be working on a new series of blog posts with <a href="http://firstyear.id.au/blog/">Firstyear</a> in which we&#8217;re going to discuss a lot of <a href="http://www.streetgeek.com.au">StreetGeek</a>&#8217;s network and server infrastructure.  Information about this is around the place (or you can ask us), but we would talk about more publicly about what goes into making a &#8220;medium&#8221; LAN party work.  I say &#8220;medium&#8221;, which is what I&#8217;d personally group all LANs with 100 to 1,000 attendees.  As a contrast, I&#8217;d call an event like <a href="http://wilanga.net/">wiLANga</a> with about 50 people &#8220;small&#8221;, and the major (commercial) US/EU LANs like <a href="http://en.wikipedia.org/wiki/QuakeCon">QuakeCon</a> with &gt; 7,000 people &#8220;large&#8221;.</p>
<p>StreetGeek itself has seen many major changes over the years, as it grew from a LAN of about 20 people hanging out in <a href="http://www.adelaide.edu.au">The University of Adelaide</a> to running monthly events with over 100 attendees at Colonel Light Gardens Uniting Church, the LAN area at <a href="http://www.avcon.org.au">AVCON</a>, and leading <a href="http://www.gamersalliance.net.au">SAGAfest</a> in 2009.  With this, it&#8217;s had to adapt to these new, larger environments, and invest in better hardware.</p>
<p>Here&#8217;s what StreetGeek&#8217;s network looks like, showing only the switches.</p>
<p><img src="/static/resc/network-layout-jun10.png" alt=""/></p>
<p>StreetGeek&#8217;s backbone is a <a href="http://www.cisco.com/en/US/products/ps9984/">Cisco-Linksys SGE2010</a>.  It&#8217;s a 48 port managed full-fabric gigabit switch, with 4 <a href="http://en.wikipedia.org/wiki/Small_form-factor_pluggable_transceiver">SFP ports</a>.  It replaced a previous Alloy 48-port managed gigabit switch, which didn&#8217;t have as many features, and had the nasty habit of overheating under the load we put it through.  This switch lives on the &#8220;mu table&#8221; (formerly known as the B/C tables).</p>
<p>Coming off that are three <a href="http://www.cisco.com/en/US/products/ps9989/index.html">Cisco-Linksys SRW2024</a> switches.  They&#8217;re 24-port managed full-fabric gigabit switches, which are connected to the backbone each by two copper links using link aggregation.  This means between these switches and the backbone there is 2gbit/s of connectivity, full-duplex.  These switches live on D, E and G tables, where they together pushed about 7 TiB of traffic during the 10.06 event, with 1.1GiB/s peaks from clients on those tables (that&#8217;s about 10gbit/s).  While the amount may seem impressive, in reality it&#8217;s really not &#8211; the switches could push 8.3GiB/s (72gbit/s) of traffic, which if running flat out for an entire event would add up to about 758.6 TiB.</p>
<p>On the overflow tables, and in the console area, there are <a href="http://www.cisco.com/en/US/products/ps10015/index.html">Cisco-Linksys SR2024</a> switches.  They&#8217;re the unmanaged counterpart of the SRW2024, so they don&#8217;t support link aggregation.  These are connected in various points around the LAN, generally where there aren&#8217;t a large amount of clients to justify extra bandwidth.</p>
<p>At the moment, Firstyear has loaned the use of his <a href="http://www.apple.com/airportextreme/">Apple Airport Extreme</a> access point.  It&#8217;s a 802.11n access point, which is also one of the few wireless access points on the market that can do 2.4GHz and 5GHz at the same time (thereby effectively doubling the available spectrum that an access point can occupy).  They easily handle having 50 clients on the network, and have coverage around most of the venue.  We&#8217;re planning to replace this in the future with the LAN purchasing two of it&#8217;s own Airport Extremes: one in the main hall, and one in the console area.</p>
<p>We&#8217;ve tested these access points with <a href="http://gm.stackunderflow.com/blog/">gm</a> trying to perform denial of service attacks against it with thousands of simulated clients, and it held up where other routers would just crash.  Previously we had used 3 D-Link 802.11n access points to service the network, however the reliability of these access points under load was absolutely atrocious.</p>
<p>Something that may stand out with this is that the console area has a very poor layout.  In the end, the console area doesn&#8217;t push enough traffic to justify additional cabling to do things &#8220;properly&#8221;.  The only current-generation console that has gigabit ethernet is the Playstation 3, and nothing on the Playstation 3 actually pushes that kind of bandwidth.  Typically, LAN games use a megabit or two per second, which is just tiny.  The largest amount of bandwidth is used by the RetroLAN PCs, where 10 machines boot from an iSCSI virtual disk &#8211; and even then that&#8217;s only used for the operating system.</p>
<p>So this has pretty much covered our layout.  We run a lot of services on the network itself, which will be covered in later editions of this series.  Most of them are from servers in the office, or from servers in the admin area of the LAN hanging off the backbone.</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/08/11/powering-streetgeek-0x00/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why you SHOULDN&#8217;T make an App for marketing your business</title>
		<link>http://micolous.id.au/archives/2010/07/21/why-you-shouldnt-make-an-app-for-marketing-your-business/</link>
		<comments>http://micolous.id.au/archives/2010/07/21/why-you-shouldnt-make-an-app-for-marketing-your-business/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 11:08:20 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=314</guid>
		<description><![CDATA[It seems that it&#8217;s all the rage these days to make iPhone applications for everything, because apparently they&#8217;re exceedingly popular and everyone wants to get on the gravy train.  But looking at the reality of it all, it&#8217;s a foolish manoeuvre.  Pretty much all these arguments can be applied to exclusively developing for [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that it&#8217;s all the rage these days to make iPhone applications for everything, because apparently they&#8217;re exceedingly popular and everyone wants to get on the gravy train.  But looking at the reality of it all, it&#8217;s a foolish manoeuvre.  Pretty much all these arguments can be applied to exclusively developing for any mobile platform.</p>
<p>Lets look at the reality: does your business <strong>really</strong> need an App?</p>
<p>For the vast majority of people, the answer is no, your business does not.</p>
<p>As an example, say we&#8217;re building a tourist guide for a town.  You want to show people around, you want to be able to tell them about things that are nearby, you want to direct them when they&#8217;re lost, and you want to show them all the places they can spend their money.</p>
<p>How does building an App for your town be any better than say, Google or Microsoft&#8217;s local mapping offerings?  They have <a href="http://bit.ly/aQVz5T">business</a> <a href="http://bit.ly/cm3Al9">listings</a> that allow a great deal of information to be entered.  In the case of Google&#8217;s offering, this is fully integrated with their mapping application that comes installed by default on all Android and iPhones, and can be installed as an extra application on Blackberry, Symbian and Windows Mobile.</p>
<p>How can your town improve on this?  How can your town justify the expenditure of developing it&#8217;s own application (either internally or externally), maintaining it, advertising it, versus talking to one of these major players who are more than happy to receive more data to expand their own market share?  A bonus is that the marketing that those major players engage in directly benefit you, because chance are your target audience will already have it installed.</p>
<p>The other fun part of mobile development is that every device is different.  For all the sales that the iPhone has, they only make up a very small amount of phones that exist in the world.  They still make up a very small portion of those that have a web browser.  Are you going to exclude a large portion of your market on the basis they <strong>don&#8217;t</strong> have an iPhone?  Not everyone wants an iPhone, and personally, I hate them.  The same can be said if you exclusively target any platform.  You end up needing to target many platforms, and that&#8217;s where stuff starts getting expensive.</p>
<p>Another idea is to have a well maintained, accessible website.  Make it so these websites are acceptable to view on a mobile phone.  Lots of popular blogs offer customised experiences for each of the major smartphone vendors, and they even look like &#8220;native&#8221; applications.  Even better is when you have a website that just works on anything, and gracefully degrades when features are not available.  You get access to all the phone&#8217;s features that are normally reserved for locally-running applications with modern phones, such as location awareness and multimedia content.  Web standards exist to make it easier to target content to a wide audience of viewers.</p>
<p>A bonus to actually having a decent website is your developers no longer need to go through the hoops of having an entire development environment for the device, getting the application signed and approved by the vendor, and keeping it up in App Stores.  You just have to give them one of each device you want to target for, they&#8217;ll get the site working nicely for these browsers.  After that, adding content becomes trivial because one content can be served to many viewers, regardless of whether they&#8217;re browsing your website on their computer, the very latest smartphone, or a very old phone that only has a black and white screen with a GPRS data connection.  Making sure that search engines can properly index your website goes a long way seeing as most people use a search engine as their home page.</p>
<p>In the end, mobile software development is an absolute minefield.  There&#8217;s requirements to get a development license (which costs money), have your application digitally signed (which costs money), have your application listed on the manufacturer&#8217;s store (which costs money), and they can remove your application from the store and people&#8217;s devices at any time (which costs money too in lost sales).  Mobile manufacturers can and have done all of this on a whim, in an attempt to &#8220;improve security on the platform&#8221;.  It&#8217;s just not worth the hassle if you can do the same things with a properly designed website.</p>
<p>For all of these restrictions though, all these devices still come with a web browser, which is not subject to <strong>any</strong> such restrictions.  I can make a website about anything I want, and in the end, no mobile manufacturer could take it down.  If I made an App, any manufacturer could take it down straight away, purge it from users&#8217; phones, and have my developer license revoked.  All with little recourse for getting it back up, because they reserve the right to do whatever they want.</p>
<p>Just my two cents.</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/07/21/why-you-shouldnt-make-an-app-for-marketing-your-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xbox 360 Big Button: Round 2</title>
		<link>http://micolous.id.au/archives/2010/07/18/xbox-360-big-button-round-2/</link>
		<comments>http://micolous.id.au/archives/2010/07/18/xbox-360-big-button-round-2/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 08:59:08 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Toys]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=309</guid>
		<description><![CDATA[So, time for round 2 with the Big Button controllers.  I covered this stuff a bit yesturday.
I&#8217;ve since updated the driver so that it treats the directional buttons on the big button controllers as the X and Y axes.  This means that joydev.c will now detect the xbox360bb as a joystick driver, and [...]]]></description>
			<content:encoded><![CDATA[<p>So, time for round 2 with the Big Button controllers.  <a href="/archives/2010/07/18/xbox-360-big-button-ir-receiver/">I covered this stuff a bit yesturday</a>.</p>
<p>I&#8217;ve since <a href="/static/projects/bigbutton/xbox360bb-20100718.tar.bz2">updated the driver</a> so that it treats the directional buttons on the big button controllers as the X and Y axes.  This means that joydev.c will now detect the xbox360bb as a joystick driver, and so ordinary programs that use Linux&#8217;s joystick API can receive events from the controllers (and not just those that use evdev).</p>
<p>I also <a href="/static/projects/bigbutton/simon-20100718.tar.bz2">wrote a simple pygame version</a> of <em><a href="http://en.wikipedia.org/wiki/Simon_(game)">Simon</a></em>.  This works whenever you have four joystick devices attached to your computer.  You play by pressing any button on the controller.  The colours match up to how the Big Button controllers are presented in xbox360bb.  As soon as one person makes a mistake, the game ends.  The loser is reported on the console.</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/07/18/xbox-360-big-button-round-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xbox 360 &#8220;Big Button&#8221; IR Receiver</title>
		<link>http://micolous.id.au/archives/2010/07/18/xbox-360-big-button-ir-receiver/</link>
		<comments>http://micolous.id.au/archives/2010/07/18/xbox-360-big-button-ir-receiver/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 17:00:06 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Toys]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=306</guid>
		<description><![CDATA[I found some kernel patches around for the Xbox 360 &#8220;Big Button&#8221; controllers (USB Device ID: 045e:a101).  These are bundled with the game Scene It? Box Office Smash.
These are written by James Mastros (not me).  At the moment, the Linux kernel developers have not accepted any patches for supporting the device, because of [...]]]></description>
			<content:encoded><![CDATA[<p>I found some <a href="http://markmail.org/search/?q=%22big+button%22+list:org.kernel.vger.linux-input+order:date-backward#query:%22big%20button%22%20list%3Aorg.kernel.vger.linux-input%20order%3Adate-backward+page:1+mid:l7eh7rc2doy4e67a+state:results">kernel patches</a> around for the <a href="http://support.xbox.com/support/en/us/xbox360/kb.aspx?ID=944845&#038;lcid=1033&#038;category=hardware">Xbox 360 &#8220;Big Button&#8221; controllers</a> (USB Device ID: 045e:a101).  These are bundled with the game <em><a href="http://en.wikipedia.org/wiki/Scene_It%3F_Box_Office_Smash">Scene It? Box Office Smash</a></em>.</p>
<p>These are written by James Mastros (not me).  At the moment, the Linux kernel developers have <strong>not</strong> accepted any patches for supporting the device, because of <a href="http://markmail.org/message/tfdvlegdvldr4brr">code quality issues</a>.  So if you wanted to have a go with these drivers, be aware that it&#8217;s experimental in nature, may cause your computer to catch fire, or crash your system if you press the wrong combination of buttons.  Take care!</p>
<p>For convenience, I&#8217;ve <a href="/static/resc/xbox360bb.tar.bz2">tarballed up the driver and a basic Makefile</a> (for Debian) that will allow you to build the module without recompiling your whole kernel.  It should be a simple matter of extracting the archive to /usr/src and typing &#8216;make&#8217;.  This will build the module &#8216;xbox360bb.ko&#8217;, which you can insmod.  You&#8217;ll need build-essential, linux-headers and linux-kbuild packages for your kernel installed.</p>
<p>It presents the controller has four input event devices, one for each coloured controller (green, red, blue and yellow).  Each controller has 7 &#8220;normal&#8221; buttons, plus a big button on the top acts as a D-Pad and can be pushed straight down as another button.</p>
<p>You can test their operation with evtest.  These don&#8217;t come up as regular joystick devices, which may make their use with other software difficult (ie: the program will have to be specifically designed to handle evdev to be able to use it as a controller).</p>
<p>The devices themselves use Consumer IR to talk to the receiver, so if you have a CIR receiver already in your computer, you can probably use the controllers without the dongle.  However the dongle itself does not act as a CIR receiver with the xbox360bb module (so you couldn&#8217;t use it with a Windows Media Centre remote for a HTPC&#8230; but you could use the Big Button controllers for that).</p>
<p>Some ideas for these controllers, in case you had these or Buzz controllers and wanted a project idea:</p>
<ul>
<li>A quiz game (obviously) with customizable questions.  There&#8217;s a few programs out there that already do this, and chances are they could be extended to use the Big Button controllers.  It could be linked to a speech recognition software in order to allow players to verbally give their answer to a question.</li>
<li>An image categorization/rating program.  It could be used for up to four people to sort through images at once, and quickly give feedback.</li>
<li>A <a href="http://en.wikipedia.org/wiki/Simon_(game)">Simon</a> game.</li>
</ul>
<p><em>Note:</em> I&#8217;ve since written <a href="/archives/2010/07/18/xbox-360-big-button-round-2/">a second round</a> to this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/07/18/xbox-360-big-button-ir-receiver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>portal2 2.8.1 API documentation</title>
		<link>http://micolous.id.au/archives/2010/05/01/portal2-2-8-1-api-documentation/</link>
		<comments>http://micolous.id.au/archives/2010/05/01/portal2-2-8-1-api-documentation/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 20:27:13 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Lanning]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=278</guid>
		<description><![CDATA[There have been some requests that I make portal2&#8217;s API documentation available online and not just available at LANs.  So I have published a copy of the portal2 API v2.8.1.  This covers the (at the time of writing) current version of portal2&#8217;s HTTP GET and XMLRPC APIs.
Unfortunately, there&#8217;s no online &#8220;simulator&#8221; available, but [...]]]></description>
			<content:encoded><![CDATA[<p>There have been some requests that I make <a href="/projects/portal2/">portal2</a>&#8217;s API documentation available online and not just available at LANs.  So I have published a copy of the <a href="/projects/portal2/portal2_api/">portal2 API v2.8.1</a>.  This covers the (at the time of writing) current version of portal2&#8217;s HTTP GET and XMLRPC APIs.</p>
<p>Unfortunately, there&#8217;s no online &#8220;simulator&#8221; available, but that should be trivial for someone to write if they&#8217;re testing their program.</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/05/01/portal2-2-8-1-api-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TrolledFS: A filesystem with fake file contents</title>
		<link>http://micolous.id.au/archives/2010/04/22/trolledfs-a-filesystem-with-fake-file-contents/</link>
		<comments>http://micolous.id.au/archives/2010/04/22/trolledfs-a-filesystem-with-fake-file-contents/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 21:00:59 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=250</guid>
		<description><![CDATA[My friend [gm] had this idea for a filesystem.  It would take a real filesystem, and then whenever a user requested to open a file, it would instead give them a contents of another file from another folder, determined by it&#8217;s file extension.  For example, it would map all AVI files to a [...]]]></description>
			<content:encoded><![CDATA[<p>My friend <a href="http://gm.stackunderflow.com/blog/">[gm]</a> had this idea for a filesystem.  It would take a real filesystem, and then whenever a user requested to open a file, it would instead give them a contents of another file from another folder, determined by it&#8217;s file extension.  For example, it would map all AVI files to a single AVI file in another folder.</p>
<p>Because he didn&#8217;t implement it, and I got bored, I ended up <a href="http://micolous.id.au/static/projects/junkcode/trolledfs.py.bz2">writing &#8220;TrolledFS&#8221; as a FUSE filesystem module in Python</a>.</p>
<p>The module requests two options, <code>root</code>, which is the directory that provides the structure of the filesystem (ie: it will appear to be a copy of this folder), and <code>fakes</code>, a folder containing replacement files.  So if you requested <code>example.avi</code>, it would map it to the first file with the AVI extension in the fakes folder.</p>
<p>It is based on the Xmp.py (example) filesystem module from FUSE&#8217;s Python bindings, with all of the write calls filtered out.  Instead, filesystem will say it is a read-only filesystem.  If a file has no match in the fakes folder, the filesystem will say there was an I/O error.</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/04/22/trolledfs-a-filesystem-with-fake-file-contents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooth scrolling marquees in GTK#</title>
		<link>http://micolous.id.au/archives/2010/04/20/smooth-scrolling-marquees-in-gtksharp/</link>
		<comments>http://micolous.id.au/archives/2010/04/20/smooth-scrolling-marquees-in-gtksharp/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 20:06:28 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=244</guid>
		<description><![CDATA[Marquees aren&#8217;t normally supported in GTK#.  You have to write an implementation yourself, using the ViewPort and Label controls.  You can do that with this bit of code.  It&#8217;s a bit of a hack, you need to add a bunch of whitespace to your text to display so that the text properly [...]]]></description>
			<content:encoded><![CDATA[<p>Marquees aren&#8217;t normally supported in GTK#.  You have to write an implementation yourself, using the ViewPort and Label controls.  You can do that with this bit of code.  It&#8217;s a bit of a hack, you need to add a bunch of whitespace to your text to display so that the text properly &#8220;scrolls in&#8221; at the start, and scrolls out properly as well without graphical glitches.  This code runs nice and smooth by moving the text to the left by 3px every 33ms (so it works out to about 30fps).</p>
<p>Video demo (<a href="http://www.youtube.com/watch?v=HIO4fS-I-f4">or you can watch it on YouTube</a>):</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/HIO4fS-I-f4&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HIO4fS-I-f4&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>You need to put this code inside your Gtk.Window.</p>
<pre class="prettyprint">public partial class MainWindow : Gtk.Window
{
	// viewport which we use to contain the label and handle the scrolling of the marquee.
	private Viewport vpMarquee = new Viewport();

	// marquee text should have some padding before and after the text, to avoid rendering errors, and
	// to allow the text to "flow in" when it is reset after reaching the end.
	private Label lblMarquee = new Label("                                                                                                 [lblMarquee] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec metus quam, ullamcorper eu suscipit quis, rutrum sit amet massa.                                                                                                 ");//" Nunc dapibus accumsan metus, commodo placerat urna blandit non. Nullam turpis justo, dictum quis dignissim non, vehicula vel lorem. Fusce congue purus odio, lobortis pulvinar neque. Integer dui odio, venenatis sed tincidunt in, fringilla id urna. Maecenas faucibus massa eu orci tincidunt ac vulputate nibh aliquam. Aliquam ullamcorper erat nunc. Vestibulum hendrerit adipiscing neque quis interdum.");

	public MainWindow () : base(Gtk.WindowType.Toplevel)
	{
		// normally you'd be using Stetic, so you need to call it's build-constructor.
		Build ();

		// add the control to the window.  in this example, i'm adding it to a VBox control as the last element.
		vpMarquee.BorderWidth = 0;
		vpMarquee.Add (lblMarquee);
		this.vbox1.PackEnd (vpMarquee, false, false, 0);

		// update marquee every 33ms (~30fps)
		GLib.Timeout.Add (33, new GLib.TimeoutHandler (MarqueeUpdate));

		// add other code here for other things...
	}

	bool MarqueeUpdate ()
	{
		Application.Invoke (delegate {
			// calculate the total amount of space the marquee requires.  this only works because I've manually set the size of the window,
			// otherwise you need another way to get the width of the window instead of this.
			double n = vpMarquee.Hadjustment.Upper - this.WidthRequest;
			if (n < 1)
				// safety incase we don't have an actual width calculated width
				n = 1;

			//Console.WriteLine("{0} > {1} ?", vpMarquee.Hadjustment.Value, n);
			if (vpMarquee.Hadjustment.Value >= n) {
				// we've reached the end.  reset the marquee to the 0-position.
				vpMarquee.Hadjustment.Value = 0;
			} else {
				// scroll the marquee to the left by 3px
				vpMarquee.Hadjustment.Value += 3;
			}

			// tell gtk# we want it to take into account the updated value.
			vpMarquee.Hadjustment.ChangeValue ();
			vpMarquee.Hadjustment.Change ();

			// redraw the control and it's children (the label).
			vpMarquee.ShowAll ();
		});

		// tell Timeout we want to be called again.
		return true;
	}

	// ... add more stuff here for other functionality.
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/04/20/smooth-scrolling-marquees-in-gtksharp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearing the &#8220;Mounted Devices&#8221; database in Windows</title>
		<link>http://micolous.id.au/archives/2010/04/15/clearing-the-mounted-devices-database-in-windows/</link>
		<comments>http://micolous.id.au/archives/2010/04/15/clearing-the-mounted-devices-database-in-windows/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 23:01:44 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=238</guid>
		<description><![CDATA[Something I found useful when doing image deployment of Windows: being able to clear the mount devices list.  In some instances, Windows will not boot properly or it will boot from the wrong device until you do it.  You don&#8217;t need to do this with sysprep (it does it for you), however sysprep [...]]]></description>
			<content:encoded><![CDATA[<p>Something I found useful when doing image deployment of Windows: being able to clear the mount devices list.  In some instances, Windows will not boot properly or it will boot from the wrong device until you do it.  You don&#8217;t need to do this with sysprep (it does it for you), however sysprep won&#8217;t work in an iSCSI configuration due to redetecting the network card and resetting all the iSCSI configuration.</p>
<p>For this, you can use the chntpw utility.</p>
<p>First of all, mount the Windows partition.</p>
<p>Then crack it open with chntpw&#8217;s registry editor, and remove the entries.</p>
<pre lang="txt" line="1"># chntpw -e WINDOWS/system32/config/system
chntpw version 0.99.6 080526 (sixtyfour), (c) Petter N Hagen
Hive <WINDOWS/system32/config/system> name (from header): <SYSTEM>
ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c <lh>
Page at 0x54f000 is not 'hbin', assuming file contains garbage at end
File size 5767168 [580000] bytes, containing 1254 pages (+ 1 headerpage)
Used for data: 108658/5500560 blocks/bytes, unused: 1836/21680 blocks/bytes.

Simple registry editor. ? for help.

> cd MountedDevices</pre>
<p>You can now show the mounted devices table.  This one is populated with a bunch of stuff:</p>
<pre lang="txt" line="1">\MountedDevices> ls
Node has 0 subkeys and 8 values
  size     type            value name             [value if type DWORD]
    12  REG_BINARY        <\??\Volume{a04045a6-480a-11df-8146-806d6172696f}>
    12  REG_BINARY        <\??\Volume{a04045a7-480a-11df-8146-806d6172696f}>
   238  REG_BINARY        <\??\Volume{a04045a8-480a-11df-8146-806d6172696f}>
   164  REG_BINARY        <\??\Volume{a04045a9-480a-11df-8146-806d6172696f}>
    12  REG_BINARY        <\DosDevices\C:>
    12  REG_BINARY        <\DosDevices\D:>
   164  REG_BINARY        <\DosDevices\A:>
   238  REG_BINARY        <\DosDevices\E:>
</pre>
<p>Removing it is as simple as the &#8216;delallv&#8217; command.</p>
<pre lang="txt" line="1">\MountedDevices> delallv

\MountedDevices> q

Hives that have changed:
 #  Name
 0  <WINDOWS/system32/config/system>
Write hive files? (y/n) [n] : y
 0  <WINDOWS/system32/config/system> - OK
</pre>
<p>And then it&#8217;s done.  You can unmount the partition, and boot Windows again.</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/04/15/clearing-the-mounted-devices-database-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internode Radio playlist files for XBMC (and others)</title>
		<link>http://micolous.id.au/archives/2010/03/02/internode-radio-playlist-files-for-xbmc-and-others/</link>
		<comments>http://micolous.id.au/archives/2010/03/02/internode-radio-playlist-files-for-xbmc-and-others/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 03:37:55 +0000</pubDate>
		<dc:creator>micolous</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://micolous.id.au/?p=230</guid>
		<description><![CDATA[I got bored and created playlist files for all the radio stations that Internode mirror.  They point to the playlist files on the page so should keep updated if the servers get changed again.
This file doesn&#8217;t update at all if a station gets added or removed from the list.
In XBMC, you just have to [...]]]></description>
			<content:encoded><![CDATA[<p>I got bored and created playlist files for all the radio stations that <a href="http://www.internode.on.net/residential/entertainment/broadband_radio/">Internode mirror</a>.  They point to the playlist files on the page so should keep updated if the servers get changed again.</p>
<p>This file doesn&#8217;t update at all if a station gets added or removed from the list.</p>
<p>In XBMC, you just have to put this ZIP file in a folder it uses as a source, and you can browse into it and play radio stations without extracting the archive.  In other players, you have to extract it yourself.</p>
<p><a href="/static/resc/InternodeRadio.zip">Download the archive</a>.</p>
<p><strong>Update (2010-03-16)</strong>: Internode added <a href="http://www.internode.on.net/residential/entertainment/broadband_radio/#AllInternodeRadioStreams">automatically generated playlist files</a> to their website in various formats, rendering this obsolete.</p>
]]></content:encoded>
			<wfw:commentRss>http://micolous.id.au/archives/2010/03/02/internode-radio-playlist-files-for-xbmc-and-others/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
