<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Austin - Python, Django, open source, and other internet shenanigans</title><link href="https://www.mattaustin.me/" rel="alternate"></link><link href="https://www.mattaustin.me/feed/" rel="self"></link><id>https://www.mattaustin.me/</id><updated>2017-01-21T14:20:46+00:00</updated><subtitle>Python, Django, open source, Linux, and other internet shenanigans.</subtitle><subtitle>Python, Django, open source, Linux, and other internet shenanigans.</subtitle><entry><title>Python "Mobile Snakes" presentation</title><link href="https://www.mattaustin.me/2013/12/python-mobile-snakes-presentation/" rel="alternate"></link><published>2013-12-24T11:51:00+00:00</published><updated>2013-12-24T03:53:33+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2013-12-24:/2013/12/python-mobile-snakes-presentation/</id><content type="html">&lt;p&gt;Back in November I gave a quick presentation to the Perth Django/Python Users
Group.&lt;/p&gt;
&lt;p&gt;It covered a brief history of Python on mobile devices (Maemo/MeeGo/Nemo/
Sailfish), and an example Python/Qt application which has a custom UI for each
platform.&lt;/p&gt;
&lt;p&gt;The slides can be downloaded here:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://files.mattaustin.me.uk/mobile-snakes-2013-11.pdf"&gt;Mobile Snakes (November 2013)&lt;/a&gt;&lt;/p&gt;
</content><category term="Python"></category><category term="fremantle line"></category><category term="harmattan"></category><category term="maemo"></category><category term="meego"></category><category term="nemo"></category><category term="presentation"></category><category term="python"></category><category term="qml"></category><category term="qt"></category><category term="sailfish"></category><category term="slides"></category><category term="ubuntu touch"></category></entry><entry><title>Cross-platform mobile python development with native UIs using QML</title><link href="https://www.mattaustin.me/2013/11/cross-platform-mobile-python-development-with-native-uis/" rel="alternate"></link><published>2013-11-05T13:54:00+00:00</published><updated>2017-01-21T14:04:35+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2013-11-05:/2013/11/cross-platform-mobile-python-development-with-native-uis/</id><content type="html">&lt;p&gt;I've been playing round with developing native UIs for different mobile
platforms using QML.&lt;/p&gt;
&lt;p&gt;I've quite a fan of 'common-base, separate UI' development, and QML provides a
great way to implement it.&lt;/p&gt;
&lt;p&gt;Code is available on &lt;a class="reference external" href="https://github.com/mattaustin/fremantleline"&gt;github&lt;/a&gt;.&lt;/p&gt;
&lt;div class="section" id="fremantle-maemo-5"&gt;
&lt;h2&gt;Fremantle (Maemo 5)&lt;/h2&gt;
&lt;img alt="" src="https://www.mattaustin.me/images/fremantle.png" style="width: 300px; height: 180px;" /&gt;
&lt;/div&gt;
&lt;div class="section" id="harmattan-maemo-6-meego"&gt;
&lt;h2&gt;Harmattan (Maemo 6 / MeeGo)&lt;/h2&gt;
&lt;img alt="" src="https://www.mattaustin.me/images/harmattan.png" style="width: 168px; height: 300px;" /&gt;
&lt;/div&gt;
&lt;div class="section" id="ubuntu-touch"&gt;
&lt;h2&gt;Ubuntu Touch&lt;/h2&gt;
&lt;img alt="" src="https://www.mattaustin.me/images/saucy.png" style="width: 180px; height: 300px;" /&gt;
&lt;/div&gt;
&lt;div class="section" id="sailfish"&gt;
&lt;h2&gt;Sailfish&lt;/h2&gt;
&lt;img alt="" src="https://www.mattaustin.me/images/sailfish.png" style="width: 172px; height: 300px;" /&gt;
&lt;/div&gt;
</content><category term="Python"></category><category term="maemo"></category><category term="meego"></category><category term="python"></category><category term="qml"></category><category term="qt"></category><category term="sailfish"></category><category term="ubuntu"></category></entry><entry><title>Perth Trains – Live Departures ported to Sailfish</title><link href="https://www.mattaustin.me/2013/05/perth-trains-live-departures-sailfish/" rel="alternate"></link><published>2013-05-19T12:48:00+00:00</published><updated>2017-01-21T14:05:24+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2013-05-19:/2013/05/perth-trains-live-departures-sailfish/</id><content type="html">&lt;p&gt;I'm pleased to announce that &amp;quot;Perth Trains&amp;quot; has been ported to &lt;a class="reference external" href="http://www.sailfishos.org/"&gt;Sailfish OS&lt;/a&gt;, using &lt;a class="reference external" href="https://sailfishos.org/sailfish-silica/"&gt;Silica QML components&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The app provides a simple way to view 'live' departure times of train services
across Perth. Versions for &lt;a class="reference external" href="https://www.mattaustin.me/2011/08/perth-trains-live-departures-for-nokia-n9-meego-1-2-harmattan/"&gt;MeeGo Harmattan&lt;/a&gt;
and &lt;a class="reference external" href="https://www.mattaustin.me/2010/01/fremantle-line-transperth-trains-live-departure-boards-for-n900-and-ubuntu/"&gt;Maemo 5&lt;/a&gt;
are also available.&lt;/p&gt;
&lt;img alt="Perth Trains - Live Departures for Sailfish: Station List" src="https://www.mattaustin.me/images/Screenshot-from-2013-05-18-184631.png" style="width: 240px; height: 427px;" /&gt;
&lt;img alt="Perth Trains - Live Departures for Sailfish: Subiaco" src="https://www.mattaustin.me/images/Screenshot-from-2013-05-17-211919.png" style="width: 240px; height: 427px;" /&gt;
&lt;p&gt;I'm very much looking forward to tomorrow's announcement from
&lt;a class="reference external" href="http://jolla.com/"&gt;Jolla&lt;/a&gt; as to what the N9's successor might look like!&lt;/p&gt;
&lt;p&gt;Source code is hosted on
&lt;a class="reference external" href="https://github.com/mattaustin/fremantleline"&gt;github&lt;/a&gt;.&lt;/p&gt;
</content><category term="Sailfish OS"></category><category term="app"></category><category term="jolla"></category><category term="perth"></category><category term="pyside"></category><category term="python"></category><category term="qml"></category><category term="qt"></category><category term="sailfish"></category></entry><entry><title>Perth Trains is now available in the Nokia Store</title><link href="https://www.mattaustin.me/2012/06/perth-trains-is-now-available-in-the-nokia-store/" rel="alternate"></link><published>2012-06-19T22:58:00+00:00</published><updated>2017-01-21T14:05:50+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2012-06-19:/2012/06/perth-trains-is-now-available-in-the-nokia-store/</id><content type="html">&lt;p&gt;My &lt;a class="reference external" href="https://www.mattaustin.me/2011/08/perth-trains-live-departures-for-nokia-n9-meego-1-2-harmattan/"&gt;Perth Trains live departures app&lt;/a&gt;
for the Nokia N9 is now available for &lt;a class="reference external" href="http://store.ovi.com/content/287369"&gt;download in the Nokia Store&lt;/a&gt;.&lt;/p&gt;
</content><category term="MeeGo"></category><category term="app"></category><category term="harmattan"></category><category term="maemo"></category><category term="meego"></category><category term="nokia"></category><category term="nokia n9"></category><category term="nokia n950"></category><category term="nokia store"></category><category term="python"></category><category term="qml"></category><category term="qt"></category></entry><entry><title>Configuring iiNet VOIP (iiTalk) on the Nokia N9 (and N950)</title><link href="https://www.mattaustin.me/2011/09/configuring-iinet-voip-iitalk-on-the-nokia-n9/" rel="alternate"></link><published>2011-09-13T22:21:00+00:00</published><updated>2017-01-21T14:06:37+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2011-09-13:/2011/09/configuring-iinet-voip-iitalk-on-the-nokia-n9/</id><content type="html">&lt;p&gt;The Nokia N9 running MeeGo 1.2 Harmattan is soon to be released here in
Australia. I'm lucky enough to be in possession of a developers device, and I
thought I'd post a quick follow-up on my &lt;a class="reference external" href="https://www.mattaustin.me/2009/12/configuring-iinet-voip-iitalk-on-the-nokia-n900/"&gt;previous guide&lt;/a&gt; for
configuring iiNet VOIP (iiTalk).&lt;/p&gt;
&lt;p&gt;Like it's predecessor (the N900), the Nokia N9 has completely integrated
support for Mobile, VOIP, Skype, and Google Talk calls - you can make and
receive calls on these services just like a usual mobile call, straight from
the address book or dialing pad.&lt;/p&gt;
&lt;p&gt;This means you can use the N9 with iiTalk, rather than using a headset hooked
up to a computer.&lt;/p&gt;
&lt;p&gt;Here are the settings I configured on the phone:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remember you will also have to configure port forwarding to the IP address of
your phone on your wifi network – read&lt;/strong&gt; &lt;a class="reference external" href="https://iihelp.iinet.net.au/VoIP_settings"&gt;iiNet's documentation&lt;/a&gt; &lt;strong&gt;for details.&lt;/strong&gt;&lt;/p&gt;
&lt;img alt="" src="https://www.mattaustin.me/images/2011-08-23_21-26-58.png" style="width: 239px; height: 427px;" /&gt;
&lt;img alt="" src="https://www.mattaustin.me/images/2011-08-23_21-27-14.png" style="width: 239px; height: 427px;" /&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;User name: &lt;tt class="docutils literal"&gt;{your iiNet VOIP phone &lt;span class="pre"&gt;number}&amp;#64;iinetphone.iinet.net.au&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Password: &lt;tt class="docutils literal"&gt;{your iiNet VOIP password}&lt;/tt&gt; &lt;em&gt;(*it's different to your broadband
password)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Use for telephone numbers: Checked&lt;/li&gt;
&lt;li&gt;User name: &lt;tt class="docutils literal"&gt;{your iiNet VOIP phone number}&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Transport: &lt;tt class="docutils literal"&gt;UDP&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Outbound proxy: &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;sip.{state}.iinet.net.au`&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Port: &lt;tt class="docutils literal"&gt;5060&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Discover public address: Checked&lt;/li&gt;
&lt;li&gt;Loose routing: Unchecked&lt;/li&gt;
&lt;li&gt;Keep alive mechanism: &lt;tt class="docutils literal"&gt;REGISTER&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Keep-alive period: &lt;tt class="docutils literal"&gt;2 minutes&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Auto-detect STUN: Unchecked&lt;/li&gt;
&lt;/ul&gt;
</content><category term="MeeGo"></category><category term="harmattan"></category><category term="iinet"></category><category term="iitalk"></category><category term="meego"></category><category term="nokia n9"></category><category term="nokia n950"></category><category term="sip"></category><category term="voip"></category></entry><entry><title>Perth Trains - Live Departures for Nokia N9 (MeeGo 1.2 Harmattan)</title><link href="https://www.mattaustin.me/2011/08/perth-trains-live-departures-for-nokia-n9-meego-1-2-harmattan/" rel="alternate"></link><published>2011-08-21T16:30:00+00:00</published><updated>2013-06-02T07:22:13+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2011-08-21:/2011/08/perth-trains-live-departures-for-nokia-n9-meego-1-2-harmattan/</id><content type="html">&lt;p&gt;Thanks to Nokia for providing me with a N950 MeeGo 1.2 Harmattan developer
device. I've now ported my Maemo application to PySide/QML, and a preview
release of Perth Trains (v0.1) is ready.&lt;/p&gt;
&lt;p&gt;This application provides a simple interface to check the 'live' departure
times of train services across the metropolitan area of Perth, Western
Australia.&lt;/p&gt;
&lt;img alt="" src="https://raw.github.com/mattaustin/fremantleline/0.5/docs/images/harmattan-1.png" /&gt;
&lt;img alt="" src="https://raw.github.com/mattaustin/fremantleline/0.5/docs/images/harmattan-2.png" /&gt;
&lt;p&gt;The application can be installed by &lt;a class="reference external" href="https://projects.developer.nokia.com/perthtrains/files/downloads/fremantleline_0.5_armel.deb"&gt;downloading the deb package&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Any feedback is most welcome. The application uses Python/Qt (PySide/QML). The
project homepage and source code can be found at:
&lt;a class="reference external" href="https://github.com/mattaustin/fremantleline"&gt;https://github.com/mattaustin/fremantleline&lt;/a&gt;.&lt;/p&gt;
</content><category term="MeeGo"></category><category term="harmattan"></category><category term="meego"></category><category term="nokia n9"></category><category term="nokia n950"></category><category term="perth"></category><category term="python"></category><category term="qml"></category><category term="qt"></category></entry><entry><title>Heart Internet - Domain Name "Full DNS Management" Warning</title><link href="https://www.mattaustin.me/2010/06/heart-internet-domain-name-full-dns-management-warning/" rel="alternate"></link><published>2010-06-21T21:10:00+00:00</published><updated>2017-01-21T14:07:08+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2010-06-21:/2010/06/heart-internet-domain-name-full-dns-management-warning/</id><content type="html">&lt;img alt="" class="alignleft size-full wp-image-262" src="https://www.mattaustin.me/images/heart.jpg" style="width: 369px; height: 231px;" /&gt;
&lt;p&gt;Just a quick heads up to warn people who may be relying on &lt;a class="reference external" href="http://www.heartinternet.co.uk/"&gt;Heart Internet's&lt;/a&gt; &amp;quot;Full DNS Management&amp;quot; service which is
included when registering/managing domains through them.&lt;/p&gt;
&lt;p&gt;The problem I discovered was with creating multiple TXT records. The scenarios
for this have become much more commonplace recently, for example on one of my
domains I wished to create an SPF record, an SPF v2 record, and a Google DNS
domain verification record (for use with Google Webmaster Tools) - not an
unreasonable expectation.&lt;/p&gt;
&lt;p&gt;When creating TXT records, the system will only allow one TXT record per &amp;quot;node&amp;quot;
(root-domain or subdomain). There are no error messages or warnings - just that
further TXT records don't appear after &amp;quot;saving&amp;quot; the changes.&lt;/p&gt;
&lt;p&gt;In January, I contacted Heart Internet's support asking them to investigate the
issue. The reply wasn't very reassuring:&lt;/p&gt;
&lt;blockquote&gt;
&amp;quot;However, if you require the ability to add multiple SPF/TXT records to the
same node then this will involve an update to our system so I recommed you
submit that request using the Feedback form in your control panel. It will
then be reviewed by the relevant department and you will not usually receive
any reply unless they require more information.&amp;quot;&lt;/blockquote&gt;
&lt;p&gt;I completed the feedback form, but true to the original support response - I
did not receive any reply.&lt;/p&gt;
&lt;p&gt;I don't think I'd have an issue with this as long as the limitations of their
DNS management were made clear, however the text used to describe the service
on the domain registration sales page is &lt;strong&gt;&amp;quot;Full DNS Management&amp;quot;&lt;/strong&gt;, and full
DNS management this is not.&lt;/p&gt;
&lt;p&gt;By May, I still had received no reply (not unsurprisingly considering the tone
of the ticket response). I tried to create a second TXT record, but still had
no success. I re-opened my original ticket, claiming that the &amp;quot;Full DNS
Management&amp;quot; statement could be misleading, but I just received the
stock-response again:&lt;/p&gt;
&lt;blockquote&gt;
&amp;quot;I understand but I strongly recommend you submit the Feedback form again
with your suggestion as it will then be dealt with by the relevant
department. Please note that you will not receive a reply unless they
require more information from you.&amp;quot;&lt;/blockquote&gt;
&lt;p&gt;My request, was &lt;em&gt;not&lt;/em&gt; a suggestion - it is reporting a bug with their &amp;quot;Full DNS
Management&amp;quot; platform.&lt;/p&gt;
&lt;p&gt;Finally, I'd like to say that all other aspects of their domain services I have
used have been great (I haven't tried the hosting products). I would still
recommend them for domains, as long as you are sure you will never require
multiple TXT records! I hope by bringing this issue to attention that action
may actually be taken to resolve it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 26/06/2010: Heart Internet&lt;/strong&gt; &lt;a class="reference external" href="http://twitter.com/HeartInternet/status/16997174680"&gt;sent me a message on Twitter&lt;/a&gt; &lt;strong&gt;to let me know this
problem has now been fixed! Excellent!&lt;/strong&gt;&lt;/p&gt;
</content><category term="DNS"></category><category term="DNS"></category><category term="dns management"></category><category term="domain names"></category><category term="spf record"></category><category term="txt record"></category></entry><entry><title>Fremantle Line: Transperth Trains Live Departure Boards for N900 and Ubuntu</title><link href="https://www.mattaustin.me/2010/01/fremantle-line-transperth-trains-live-departure-boards-for-n900-and-ubuntu/" rel="alternate"></link><published>2010-01-16T14:29:00+00:00</published><updated>2017-01-21T14:07:31+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2010-01-16:/2010/01/fremantle-line-transperth-trains-live-departure-boards-for-n900-and-ubuntu/</id><content type="html">&lt;p&gt;I have been playing around with pygtk (python and GTK), and have managed to
come up with something resembling an app to provide live departure times for
Transperth trains:&lt;/p&gt;
&lt;img alt="Perth Train Departure Board" src="https://www.mattaustin.me/images/Screenshot-20100115-215029.png" style="width: 580px; height: 348px;" /&gt;
&lt;p&gt;I've named &amp;quot;Fremantle Line&amp;quot; after Maemo 5's codename, Fremantle. It is also the
destination of one of Perth's 5 train lines.&lt;/p&gt;
&lt;p&gt;It also works in portrait mode:&lt;/p&gt;
&lt;img alt="" src="https://www.mattaustin.me/images/Screenshot-20100115-221532.png" style="width: 240px; height: 400px;" /&gt;
&lt;p&gt;It is primarily intended for the Maemo 5 platform on the Nokia N900, but will
also run under Ubuntu:&lt;/p&gt;
&lt;img alt="" src="https://www.mattaustin.me/images/Screenshot-Claisebrook-Departure-Board-4.png" style="width: 348px; height: 246px;" /&gt;
&lt;p&gt;Still needs plenty of work, but I am finding it quite useful while out and
about in Perth.&lt;/p&gt;
</content><category term="Maemo"></category><category term="fremantle line"></category><category term="gtk"></category><category term="maemo"></category><category term="nokia n900"></category><category term="perth"></category><category term="python"></category><category term="transperth"></category></entry><entry><title>Configuring iiNet VOIP (iiTalk) on the Nokia N900</title><link href="https://www.mattaustin.me/2009/12/configuring-iinet-voip-iitalk-on-the-nokia-n900/" rel="alternate"></link><published>2009-12-26T18:05:00+00:00</published><updated>2017-01-21T14:08:00+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2009-12-26:/2009/12/configuring-iinet-voip-iitalk-on-the-nokia-n900/</id><content type="html">&lt;img alt="iiNet VOIP iiTalk N900" src="https://www.mattaustin.me/images/Screenshot-20091226-173045.png" style="width: 580px; height: 348px;" /&gt;
&lt;p&gt;I just succeeded in configuring iiNet's VOIP service (I get iiTalk free with my
DSL connection) on the Nokia N900 mobile phone. One of the many great features
of the N900 is that it has completely integrated support for Mobile, VOIP,
Skype, and Google Talk calls - you can make and receive calls on these services
just like a usual mobile call, straight from the address book.&lt;/p&gt;
&lt;p&gt;This now means I can use iiTalk from my handset, rather than using a headset
hooked up to my desktop computer.&lt;/p&gt;
&lt;p&gt;For reference, here are the settings I configured on the phone:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remember you will also have to configure port forwarding to the IP address of
your phone on your wifi network - read&lt;/strong&gt; &lt;a class="reference external" href="https://iihelp.iinet.net.au/VoIP_settings"&gt;iiNet's documentation&lt;/a&gt; &lt;strong&gt;for details.&lt;/strong&gt;&lt;/p&gt;
&lt;img alt="iiNet VOIP iiTalk N900 Settings #1" src="https://www.mattaustin.me/images/Screenshot-20091226-172834.png" style="width: 580px; height: 348px;" /&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;User name: &lt;tt class="docutils literal"&gt;{your iiNet VOIP phone &lt;span class="pre"&gt;number}&amp;#64;iinetphone.iinet.net.au&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Password: &lt;tt class="docutils literal"&gt;{your iiNet VOIP password}&lt;/tt&gt; &lt;em&gt;(it's different to your broadband
password)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;img alt="iiNet VOIP iiTalk N900 Settings #2" src="https://www.mattaustin.me/images/Screenshot-20091226-172842.png" style="width: 580px; height: 348px;" /&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Use for telephone numbers: Checked&lt;/li&gt;
&lt;li&gt;User name: &lt;tt class="docutils literal"&gt;{your iiNet VOIP phone number}&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Transport: &lt;tt class="docutils literal"&gt;UDP&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Outbound proxy: &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;sip.{state}.iinet.net.au&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Port: &lt;tt class="docutils literal"&gt;5060&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;img alt="iiNet VOIP iiTalk N900 Settings #3" src="https://www.mattaustin.me/images/Screenshot-20091227-122442.png" style="width: 580px; height: 348px;" /&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Discover public address: Checked&lt;/li&gt;
&lt;li&gt;Loose routing: Unchecked&lt;/li&gt;
&lt;li&gt;Keep alive mechanism: &lt;tt class="docutils literal"&gt;REGISTER&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Keep-alive period: &lt;tt class="docutils literal"&gt;2 minutes&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Auto-detect STUN: Unchecked&lt;/li&gt;
&lt;/ul&gt;
</content><category term="Maemo"></category><category term="iinet"></category><category term="maemo"></category><category term="nokia n900"></category><category term="voip"></category></entry><entry><title>Nokia N900</title><link href="https://www.mattaustin.me/2009/12/nokia-n900/" rel="alternate"></link><published>2009-12-25T14:37:00+00:00</published><updated>2017-01-21T14:08:18+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2009-12-25:/2009/12/nokia-n900/</id><content type="html">&lt;img alt="" src="https://www.mattaustin.me/images/Screenshot-20091225-141119.png" style="width: 580px; height: 348px;" /&gt;
&lt;p&gt;I recently received my N900 (it had to be forwarded on to me in Australia from
the UK) - and it's easily the best phone i have ever used. Maemo 5 rocks, and
its amazing to be running this kind of software on a device like this.&lt;/p&gt;
&lt;p&gt;The web browser is fantastic (based on the gecko backend) - I've composed all
of this post on the device using the standard wordpress backend.&lt;/p&gt;
&lt;p&gt;Seems to work fine with Ubuntu as well - it shows up as a mass storage device
and a GSM connection when I connected it to my machine with USB.&lt;/p&gt;
&lt;p&gt;I have been attempting to improve my python skills, so maybe I'll attempt to
create some simple python and gtk apps.&lt;/p&gt;
</content><category term="Maemo"></category><category term="cli"></category><category term="maemo"></category><category term="nokia n900"></category><category term="python"></category><category term="ubuntu"></category></entry><entry><title>Disabling The Annoying Middle-Click Load Clipboard URL Behaviour In Firefox</title><link href="https://www.mattaustin.me/2009/07/disabling-the-annoying-middle-click-load-clipboard-url-behaviour-in-firefox/" rel="alternate"></link><published>2009-07-13T22:42:00+00:00</published><updated>2017-01-21T14:08:31+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2009-07-13:/2009/07/disabling-the-annoying-middle-click-load-clipboard-url-behaviour-in-firefox/</id><content type="html">&lt;p&gt;I recently bought an ASUS EeePC 1000HE, and have been very pleased with it. I
immediately installed Ubuntu 9.04, and was delighted to find all functionality
working out-of-the-box.&lt;/p&gt;
&lt;p&gt;However, the one thing that has puzzled me the last couple of weeks has been
random websites loading in Firefox as I was scrolling web pages (with the
two-finger multi-touch functionality), or sometimes even an error dialogue
saying the URL was invalid and could not be loaded.&lt;/p&gt;
&lt;img alt="Firefox logo" class="size-full wp-image-150" src="https://www.mattaustin.me/images/Firefox_3.5_logo.png" style="width: 128px; height: 128px;" /&gt;
&lt;p&gt;It turns out that this is because the touchpad sometimes interpreted my
scrolling as a middle-mouse-button click - which (previously unknown to me)
causes Firefox to load the text in the clipboard as a URL.&lt;/p&gt;
&lt;p&gt;This behavior is easily disabled by going to &lt;tt class="docutils literal"&gt;about:config&lt;/tt&gt; in the address
bar, searching for &lt;tt class="docutils literal"&gt;middlemouse.contentLoadURL&lt;/tt&gt;, and changing the value to
&lt;tt class="docutils literal"&gt;false&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Hopefully this might help anyone experiencing the same issues as me. There is
more info on the &lt;tt class="docutils literal"&gt;middlemouse.contentLoadURL&lt;/tt&gt; property at &lt;a class="reference external" href="http://kb.mozillazine.org/Middlemouse.contentLoadURL"&gt;MozillaZine&lt;/a&gt;.&lt;/p&gt;
</content><category term="Ubuntu"></category><category term="eeepc"></category><category term="firefox"></category><category term="ubuntu"></category></entry><entry><title>Epiphany Webkit on Ubuntu 9.04 (Jaunty)</title><link href="https://www.mattaustin.me/2009/06/epiphany-webkit-on-ubuntu-jaunty-9-04/" rel="alternate"></link><published>2009-06-15T14:37:00+00:00</published><updated>2009-09-05T13:05:42+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2009-06-15:/2009/06/epiphany-webkit-on-ubuntu-jaunty-9-04/</id><content type="html">&lt;p&gt;&lt;strong&gt;Update 05/09/09: since I originally posted this information it looks like the
Webkit Team re-organised their PPA. I have updated the instructions - thanks to
those who let me know.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I just installed the Epiphany Webkit 2.27.2 browser from the &lt;a class="reference external" href="https://launchpad.net/~webkit-team"&gt;Webkit Team PPA&lt;/a&gt;. It seems pretty speedy - and the flash
plugin can now used.&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Add the Webkit Team PPA and Epiphany Webkit Team PPA repositories by adding
the following lines to &lt;tt class="docutils literal"&gt;/etc/apt/sources.list&lt;/tt&gt;:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;
# Epiphany Webkit PPA
deb http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main
deb http://ppa.launchpad.net/webkit-team/epiphany/ubuntu jaunty main
deb-src http://ppa.launchpad.net/webkit-team/epiphany/ubuntu jaunty main
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Add the Webkit Team PPA Key:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
wget -O webkit.key http://keyserver.ubuntu.com:11371/pks/lookup?op&lt;span class="o"&gt;=&lt;/span&gt;get&lt;span class="se"&gt;\&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;search&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0x991E6CF92D9A3C5B
sudo apt-key add webkit.key
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Install epiphany-webkit:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo apt-get install epiphany-webkit
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Not sure if this will replace Firefox on my desktop machine (I won't be able to
give up my Firefox extensions). But I will certainly use this as my main
browser on my netbook.&lt;/p&gt;
</content><category term="Ubuntu"></category><category term="epiphany"></category><category term="jaunty"></category><category term="ubuntu"></category><category term="web browser"></category><category term="webkit"></category></entry><entry><title>RealPlayer on Ubuntu 8.10 &amp; 9.04 (Intrepid &amp; Jaunty) 64-bit Machines (AMD64)</title><link href="https://www.mattaustin.me/2009/04/realplayer-on-ubuntu-810-intrepid-64-bit-machines-amd64/" rel="alternate"></link><published>2009-04-13T15:09:00+00:00</published><updated>2010-01-09T05:52:48+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2009-04-13:/2009/04/realplayer-on-ubuntu-810-intrepid-64-bit-machines-amd64/</id><content type="html">&lt;p&gt;I recently needed to install RealPlayer and the RealPlayer mozilla firefox
plugin so that I could listen to &lt;a class="reference external" href="http://www.bbc.co.uk/6music/shows/adamandjoe/"&gt;Adam &amp;amp; Joe's show on BBC 6 Music&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I had previously been using the mplayer mozilla plugin, and although playback
worked, it was quite choppy (it didn't seem to buffer too well), and I could
not pause/resume or seek.&lt;/p&gt;
&lt;p&gt;My first thought was to look in the Medibuntu repositories, and sure enough,
there was a realplayer package - unfortunately it seems that this did not
include the mozilla plugin.&lt;/p&gt;
&lt;p&gt;My next try was to look at the &lt;a class="reference external" href="http://realplayer.com/linux"&gt;RealPlayer for linux website&lt;/a&gt;, but it only has a download for the 32-bit
version. I did notice that there was a link to &lt;a class="reference external" href="http://player.helixcommunity.org/2005/downloads"&gt;helix player&lt;/a&gt; for other platforms. Helix
player is an open source media player on which RealPlayer is based. I tried
helix player, but this can not play back proprietary codecs (and therefore not
the real stream from the BBC website), however it did include a mozilla plugin!&lt;/p&gt;
&lt;p&gt;I tried a combination of both - I installed RealPlayer from the Medibuntu
repositories, and installed the mozilla plugin from the helix tarball to my
home directory. And it works!&lt;/p&gt;
&lt;p&gt;Instructions follow:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Enable the &lt;a class="reference external" href="https://help.ubuntu.com/community/Medibuntu"&gt;Medibuntu repositories&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install the RealPlayer and libstdc++5 packages:
&lt;tt class="docutils literal"&gt;sudo &lt;span class="pre"&gt;apt-get&lt;/span&gt; update &amp;amp;&amp;amp; sudo &lt;span class="pre"&gt;apt-get&lt;/span&gt; install realplayer &lt;span class="pre"&gt;libstdc++5&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Load RealPlayer (Applications &amp;gt; Sound &amp;amp; Video &amp;gt; RealPlayer), and in Tools &amp;gt;
Preferences, select the hardware tab, and set the audio driver to &lt;tt class="docutils literal"&gt;OSS&lt;/tt&gt;.
Press OK, and close RealPlayer.&lt;/li&gt;
&lt;li&gt;Download and unpack (into a temporary location) the &lt;a class="reference external" href="http://forms.helixcommunity.org/helix/builds/?category=hxplay-current"&gt;Helix Player for AMD64&lt;/a&gt; -
I grabbed the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;linux-2.6-glibc23-amd64&lt;/span&gt;&lt;/tt&gt; tar.&lt;/li&gt;
&lt;li&gt;Copy the contents of the &amp;quot;&lt;tt class="docutils literal"&gt;mozilla&lt;/tt&gt;&amp;quot; folder to &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;~/.mozilla/plugins&lt;/span&gt;&lt;/tt&gt; (in
your home directory - you may need to create the plugins folder).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Looks as if I may have jumped the gun a bit - looking at the files
installed by the medibuntu realplayer package, it does indeed look as if it
comes with the mozilla plugin. I do not know why it wasn't working for me
(maybe it places it in the wrong location?) - but I am running fine with the
above solution (even if it is a bit messy).&lt;/p&gt;
</content><category term="Ubuntu"></category><category term="firefox"></category><category term="helix player"></category><category term="intrepid"></category><category term="mozilla"></category><category term="plugin"></category><category term="realplayer"></category><category term="ubuntu"></category></entry><entry><title>Installing thummer 0.01 on Ubuntu 8.04 LTS Server</title><link href="https://www.mattaustin.me/2009/01/installing-thummer-on-ubuntu-804-lts-server/" rel="alternate"></link><published>2009-01-14T20:00:00+00:00</published><updated>2017-01-21T14:20:46+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2009-01-14:/2009/01/installing-thummer-on-ubuntu-804-lts-server/</id><content type="html">&lt;p&gt;thummer is a website-snapshot and thumbnailing utility I am working on, built
using django. Read my &lt;a class="reference external" href="https://www.mattaustin.me/2009/01/thummer-website-thumbnail-generator-cutycapt-django/"&gt;previous thummer blog post&lt;/a&gt;
to find out more about the project.&lt;/p&gt;
&lt;div class="section" id="assumptions"&gt;
&lt;h2&gt;Assumptions&lt;/h2&gt;
&lt;p&gt;In this article, I am assuming that we are installing thummer on an existing
Ubuntu server (8.04 or later) with Apache already installed, and that you are
comfortable with editing apt's sources.list file.&lt;/p&gt;
&lt;div class="section" id="step-1-install-a-fake-x-server"&gt;
&lt;h3&gt;Step 1: Install A &amp;quot;Fake&amp;quot; X-Server&lt;/h3&gt;
&lt;p&gt;If you do not have a desktop environment installed on your server (probably a
good thing!), then you will need to install &lt;strong&gt;xvfb&lt;/strong&gt;, which provides a virtual
screen so that we can capture the rendered output of the website:&lt;/p&gt;
&lt;blockquote&gt;
Xvfb provides an X server that can run on machines with no display hardware
and no physical input devices. It emulates a dumb framebuffer using virtual
memory.&lt;/blockquote&gt;
&lt;pre class="code bash literal-block"&gt;
sudo apt-get install xvfb
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="section" id="step-2-install-cutycapt"&gt;
&lt;h3&gt;Step 2: Install CutyCapt&lt;/h3&gt;
&lt;p&gt;We now need to install CutyCapt (webkit rendering).&lt;/p&gt;
&lt;p&gt;First, we need to install the cutycapt dependencies and build tools:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo apt-get install build-essential
&lt;/pre&gt;
&lt;p&gt;For hardy only: We also need some packages from hardy-backports - add the
following lines to /etc/apt/sources.list.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;
deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse``
&lt;/pre&gt;
&lt;p&gt;Now install the required qt4 packages:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo apt-get update
sudo apt-get install libqt4-dev libqt4-webkit libqt4-svg
&lt;/pre&gt;
&lt;p&gt;It's now probably a good idea to remove (or comment out) the hardy-backports
lines from your sources.list file.&lt;/p&gt;
&lt;p&gt;Download cutycapt source, and expand the tarball:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ~/
wget http://cutycapt.svn.sourceforge.net/viewvc/cutycapt/CutyCapt.tar.gz&lt;span class="se"&gt;\?&lt;/span&gt;view&lt;span class="se"&gt;\=&lt;/span&gt;tar
tar -xvvzf CutyCapt.tar.gz&lt;span class="se"&gt;\?&lt;/span&gt;view&lt;span class="se"&gt;\=&lt;/span&gt;tar
&lt;/pre&gt;
&lt;p&gt;Compile cutycapt:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; CutyCapt
qmake
make
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="section" id="step-3-install-django"&gt;
&lt;h3&gt;Step 3: Install Django&lt;/h3&gt;
&lt;p&gt;First install some packages we'll need later:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo apt-get install python-django python-imaging python-pysqlite2 libapache2-mod-python
&lt;/pre&gt;
&lt;p&gt;For hardy only: The version of django hardy ships with is too old for thummer.
Install Jaunty's version of &lt;a class="reference external" href="https://launchpad.net/ubuntu/jaunty/+package/python-django"&gt;python-django&lt;/a&gt; from the
updates repository by downloading the .deb file from Launchpad (remember to
keep an eye out for future security updates):&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ~/
wget http://launchpadlibrarian.net/17665378/python-django_1.0-1ubuntu1_all.deb
sudo dpkg -i python-django_1.0-1ubuntu1_all.deb
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="section" id="step-4-install-configure-thummer"&gt;
&lt;h3&gt;Step 4: Install &amp;amp; Configure thummer&lt;/h3&gt;
&lt;p&gt;Download thummer, expand the tarball, and move the extracted files to /var/www:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ~/
wget http://launchpad.net/thummer/trunk/0.01/+download/thummer_0.01.tar.gz
tar -xvvzf thummer_0.01.tar.gz
sudo mv thummer_0.01 /var/www/thummer
&lt;/pre&gt;
&lt;p&gt;Make sure subversion is installed:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo apt-get install subversion
&lt;/pre&gt;
&lt;p&gt;Download the required site-package, sorl-thumbnails:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo svn checkout http://sorl-thumbnail.googlecode.com/svn/trunk/sorl /usr/local/lib/python2.5/site-packages/sorl&lt;span class="sb"&gt;``&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;Create the database, and initial admin user:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /var/www/thummer/thummer
./manage.py syncdb
&lt;/pre&gt;
&lt;p&gt;Set owner so that the apache process can write to the database:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo chown -R www-data /var/www/thummer/database
&lt;/pre&gt;
&lt;p&gt;Set owner so that the apache process can write to the media directory:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo chown -R www-data /var/www/thummer/media
&lt;/pre&gt;
&lt;p&gt;Update the django website settings:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo nano ./settings.py
&lt;/pre&gt;
&lt;p&gt;Make sure that &amp;quot;&lt;tt class="docutils literal"&gt;XVFB = True&lt;/tt&gt;&amp;quot;, specify the &lt;strong&gt;full path to the database&lt;/strong&gt; for
DATABASE_NAME.&lt;/p&gt;
&lt;p&gt;Ensure the full path to the CutyCapt binary is correct.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="step-5-configure-apache"&gt;
&lt;h3&gt;Step 5: Configure Apache&lt;/h3&gt;
&lt;p&gt;Ensure that the python module for Apache is enabled:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo a2enmod mod_python
&lt;/pre&gt;
&lt;p&gt;Create a virtual-host site configuration file:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo nano /etc/apache2/sites-available/thummer
&lt;/pre&gt;
&lt;p&gt;Paste in the following configuration - replace &amp;quot;&lt;tt class="docutils literal"&gt;thummer.domainname.com&lt;/tt&gt;&amp;quot;
with your desired domain name:&lt;/p&gt;
&lt;pre class="code apacheconf literal-block"&gt;
&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt; &lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="nb"&gt;ServerName&lt;/span&gt; thummer.domainname.com
  &lt;span class="nb"&gt;DocumentRoot&lt;/span&gt; &lt;span class="sx"&gt;/var/www/thummer/thummer&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;Directory&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;/var/www/thummer/thummer&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nb"&gt;AllowOverride&lt;/span&gt; &lt;span class="k"&gt;All&lt;/span&gt;
    &lt;span class="nb"&gt;Order&lt;/span&gt; Allow,Deny
    &lt;span class="nb"&gt;Allow&lt;/span&gt; from &lt;span class="k"&gt;All&lt;/span&gt;

    &lt;span class="nb"&gt;SetHandler&lt;/span&gt; python-program
    &lt;span class="nb"&gt;PythonHandler&lt;/span&gt; django.core.handlers.modpython
    &lt;span class="nb"&gt;SetEnv&lt;/span&gt; DJANGO_SETTINGS_MODULE thummer.settings
    &lt;span class="nb"&gt;PythonPath&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;['/var/www/thummer'] + sys.path&amp;quot;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/Directory&amp;gt;&lt;/span&gt;

  &lt;span class="c"&gt;# Static Media Content&lt;/span&gt;
  &lt;span class="nb"&gt;Alias&lt;/span&gt; &lt;span class="sx"&gt;/media&lt;/span&gt; &lt;span class="sx"&gt;/var/www/thummer/media&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;/media&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nb"&gt;SetHandler&lt;/span&gt; &lt;span class="k"&gt;None&lt;/span&gt;
    &lt;span class="nb"&gt;Order&lt;/span&gt; Allow,Deny
    &lt;span class="nb"&gt;Allow&lt;/span&gt; from &lt;span class="k"&gt;All&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt;

  &lt;span class="nb"&gt;Alias&lt;/span&gt; &lt;span class="sx"&gt;/admin-media&lt;/span&gt; &lt;span class="sx"&gt;/usr/share/python-support/python-django/django/contrib/admin/media&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;/admin-media&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nb"&gt;SetHandler&lt;/span&gt; &lt;span class="k"&gt;None&lt;/span&gt;
    &lt;span class="nb"&gt;Order&lt;/span&gt; Allow,Deny
    &lt;span class="nb"&gt;Allow&lt;/span&gt; from &lt;span class="k"&gt;All&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;Enable the site, and restart apache:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
sudo a2ensite thummer
sudo /etc/init.d/apache2 restart
&lt;/pre&gt;
&lt;p&gt;Bam! Thats It! Enjoy, and let me know how it goes!&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="usage"&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;p&gt;Just use the following URL syntax to reference the image (e.g. in img
elements):&lt;/p&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;http://thummer.domainname.com/[width]/[height]/[crop]/http://url-to-capture/&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;the value of [crop] can either be 0 or 1, where 0 = scale &amp;amp; fit, and 1 = scale
&amp;amp; crop.&lt;/p&gt;
&lt;p&gt;e.g. to generate a 300x300 pixel cropped thumbnail of the &lt;a class="reference external" href="http://news.bbc.co.uk/"&gt;BBC News&lt;/a&gt; website:&lt;/p&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;http://thummer.domainname.com/300/300/1/http://news.bbc.co.uk/&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;&amp;lt;img &lt;span class="pre"&gt;src=&amp;quot;http://thummer.domainname.com/300/300/1/http://news.bbc.co.uk/&amp;quot;&lt;/span&gt; &lt;span class="pre"&gt;alt=&amp;quot;BBC&lt;/span&gt; News website thumbnail&amp;quot; /&amp;gt;&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;And here is the result:&lt;/p&gt;
&lt;img alt="BBC News website thumbnail" src="https://www.thummer.net/300/300/1/http://news.bbc.co.uk/" /&gt;
&lt;p&gt;Remember you can access the admin interface by going to
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;http://thummer.domainname.com/admin&lt;/span&gt;&lt;/tt&gt; where you can delete snapshots - so
that they are regenerated next time they are requested.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><category term="thummer"></category><category term="apache"></category><category term="cutycapt"></category><category term="django"></category><category term="gecko"></category><category term="thummer"></category><category term="ubuntu"></category><category term="webkit"></category><category term="xvfb"></category></entry><entry><title>New Google Favicon</title><link href="https://www.mattaustin.me/2009/01/new-google-favicon/" rel="alternate"></link><published>2009-01-10T14:12:00+00:00</published><updated>2017-01-21T14:09:08+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2009-01-10:/2009/01/new-google-favicon/</id><content type="html">&lt;p&gt;I noticed today that Google has a new favicon
(&lt;a class="reference external" href="http://www.google.com/favicon.ico"&gt;http://www.google.com/favicon.ico&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;I made a quick hi-res mock-up using &lt;a class="reference external" href="http://www.inkscape.org/"&gt;inkscape&lt;/a&gt;:&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;img alt="New Google Favicon" src="https://www.mattaustin.me/images/google.png" style="width: 300px; height: 300px;" /&gt;
&lt;p class="caption"&gt;New Google Favicon&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I still can't make up my mind if I like it or not.&lt;/p&gt;
</content><category term="Google"></category><category term="favicon"></category><category term="google"></category></entry><entry><title>Website Thumbnail Generator Web App - thummer</title><link href="https://www.mattaustin.me/2009/01/thummer-website-thumbnail-generator-cutycapt-django/" rel="alternate"></link><published>2009-01-10T11:37:00+00:00</published><updated>2017-01-21T14:10:00+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2009-01-10:/2009/01/thummer-website-thumbnail-generator-cutycapt-django/</id><content type="html">&lt;img alt="BBC News Website Thumbnail" src="https://www.thummer.net/250/400/1/http://news.bbc.co.uk/" style="width: 250px; height: 400px;" /&gt;
&lt;p&gt;Over Christmas I began learning &lt;a class="reference external" href="http://www.djangoproject.com/"&gt;django&lt;/a&gt; and
&lt;a class="reference external" href="http://www.python.org/"&gt;python&lt;/a&gt;. I always find it better to learn new
languages when you are applying what you read to a project that you are
actually interested in, and think might come in useful. Well, after finding
this great article on &lt;a class="reference external" href="http://lapin-blanc.net/09/11/2008/django-website-thumbnail-generator/"&gt;website thumbnail generation using cutycapt and django&lt;/a&gt; I
decided to make a small web service / web app which would generate and serve
website thumbnail screenshots of varying sizes.&lt;/p&gt;
&lt;p&gt;I've always had difficulty with the &amp;quot;free&amp;quot; web thumbnail services out there -
they usually limit the number of requests and/or thumbnail sizes as well as
using watermarks or requiring link backs. And this is understandable - running
this kind of service en-mass is resource hungry, and those servers aren't going
to pay for themselves.&lt;/p&gt;
&lt;p&gt;The idea of thummer is to allow people to set up their own thumbnail service on
their own server, allowing them to generate snapshots of websites at any size
with no restrictions.&lt;/p&gt;
&lt;p&gt;Unfortunately because of some dependencies (CutyCapt requires qt4 and an X
server) setting it up isn't quite as easy as I'd hoped, but isn't very
difficult (lots of steps - but not tricky).&lt;/p&gt;
&lt;del&gt;I'll post some instructions in the near future for Ubuntu 8.04 LTS
Server.&lt;/del&gt;&lt;p&gt;I have now posted the (rather lengthy) &lt;a class="reference external" href="https://www.mattaustin.me/2009/01/installing-thummer-on-ubuntu-804-lts-server/"&gt;installation instructions for Ubuntu
8.04 LTS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I have set up a &lt;a class="reference external" href="https://launchpad.net/thummer"&gt;project page on Launchpad for thummer&lt;/a&gt;, so any bugs and questions can be tracked.
The current release can be &lt;a class="reference external" href="https://launchpad.net/thummer/+download"&gt;downloaded from Launchpad here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A demo I set up is &lt;a class="reference external" href="https://www.thummer.net/"&gt;available here&lt;/a&gt; (but may
disappear in the future if it starts getting hammered!).&lt;/p&gt;
&lt;p&gt;This is my first django/python project, so any feedback is more than welcome!&lt;/p&gt;
</content><category term="thummer"></category><category term="cutycapt"></category><category term="django"></category><category term="thummer"></category><category term="ubuntu"></category><category term="xvfb"></category></entry><entry><title>Serving the Correct MIME Type for XHTML</title><link href="https://www.mattaustin.me/2006/11/serving-the-correct-mime-type-for-xhtml/" rel="alternate"></link><published>2006-11-01T00:05:00+00:00</published><updated>2010-04-12T09:19:30+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2006-11-01:/2006/11/serving-the-correct-mime-type-for-xhtml/</id><content type="html">&lt;div class="section" id="work-in-progess"&gt;
&lt;h2&gt;&amp;quot;Work In Progess&amp;quot;&lt;/h2&gt;
&lt;p&gt;This article is &lt;strong&gt;work in progress&lt;/strong&gt;. It will be expanded upon and become more
reader friendly - at the moment it is just a brief list of my ideas.&lt;/p&gt;
&lt;p&gt;This is a topic of much debate, but I have decided on my strategy.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;XHTML has a much stricter markup than using HTML 4. This is one of the most
appealing aspects of using it. If you decide to use it you must abide by the
rules.&lt;/li&gt;
&lt;li&gt;I wish to use XHTML, but also want it to be as compatible as possible with
older browsers (if compatibility with really old browsers is of the
&lt;strong&gt;utmost&lt;/strong&gt; concern, you should probably stick to HTML 4.01 Strict).&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="serving-up-xhtml"&gt;
&lt;h2&gt;Serving up XHTML:&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Use XHTML 1.0 (Strict / Transitional). XHTML 1.0 &lt;strong&gt;should&lt;/strong&gt; be served as
&lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt;, however it &lt;strong&gt;may&lt;/strong&gt; be served as &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt;. Any
version of XHTML later than 1.0 &lt;strong&gt;should not&lt;/strong&gt; be served as &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Serve as &lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt; to user agents which support it (e.g.
Mozilla FireFox, Opera).&lt;/li&gt;
&lt;li&gt;Serve as &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt; to user agents which do not specify acceptance of
&lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt;, but do accept &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt; (e.g. Internet
Explorer).&lt;/li&gt;
&lt;li&gt;Serve as &lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt; (i.e. as it should be) to user agents
which do not specify acceptance of &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt; (e.g. the W3C Validator).&lt;/li&gt;
&lt;li&gt;Using ASP.NET 2.0? See: &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/serving-the-correct-mime-type-for-xhtml-using-asp-net-2-0/"&gt;Serving the Correct MIME Type for XHTML using
ASP.NET 2.0&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="implications"&gt;
&lt;h2&gt;Implications:&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Use &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;UTF-8&lt;/span&gt;&lt;/tt&gt; character encoding.&lt;/li&gt;
&lt;li&gt;Only add the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;&amp;lt;?xml&lt;/span&gt; &lt;span class="pre"&gt;version=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="pre"&gt;encoding=&amp;quot;UTF-8&amp;quot;&lt;/span&gt; &lt;span class="pre"&gt;?&amp;gt;&lt;/span&gt;&lt;/tt&gt; declaration if
serving as &lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt;. It should normally be included, but is
not required when using UTF-8. Because IE6 switches to &amp;quot;quirks&amp;quot; mode when
this is included, omit when serving as &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Only add the
&lt;tt class="docutils literal"&gt;&amp;lt;meta &lt;span class="pre"&gt;http-equiv=&amp;quot;content-type&amp;quot;&lt;/span&gt; &lt;span class="pre"&gt;content=&amp;quot;text/html;&lt;/span&gt; &lt;span class="pre"&gt;charset=UTF-8&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/tt&gt;
element if serving as &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Mark all &lt;tt class="docutils literal"&gt;&amp;lt;style&amp;gt;&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;&amp;lt;script&amp;gt;&lt;/tt&gt; contents as CDATA (using the
backwards-compatible method). See: &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/marking-script-and-style-as-cdata/"&gt;Marking Script and Style as CDATA&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Follow the XHTML 1.0 Appendix C HTML Compatibility Guidelines.&lt;/li&gt;
&lt;li&gt;Stick to the 4 XHTML Safe Named Entities: &lt;tt class="docutils literal"&gt;&amp;amp;lt;&lt;/tt&gt; for &amp;lt;, &lt;tt class="docutils literal"&gt;&amp;amp;gt;&lt;/tt&gt; for &amp;gt;,
&lt;tt class="docutils literal"&gt;&amp;amp;amp;&lt;/tt&gt; for &amp;amp;, &lt;tt class="docutils literal"&gt;&amp;amp;quot;&lt;/tt&gt; for &amp;quot;. &lt;tt class="docutils literal"&gt;&amp;amp;apos;&lt;/tt&gt; for ' is not supported in IE6.
For this and all others use numbered entities (e.g. &lt;tt class="docutils literal"&gt;&amp;amp;#39;&lt;/tt&gt; for ').&lt;/li&gt;
&lt;li&gt;Check that all your JavaScript works. You can't use &lt;tt class="docutils literal"&gt;document.write()&lt;/tt&gt; or
&lt;tt class="docutils literal"&gt;innerHTML&lt;/tt&gt; (this is from my reading and is unchecked/tested).&lt;/li&gt;
&lt;li&gt;Make sure you style the &lt;tt class="docutils literal"&gt;&amp;lt;html&amp;gt;&lt;/tt&gt; element, as the &lt;tt class="docutils literal"&gt;&amp;lt;body&amp;gt;&lt;/tt&gt; element doesn't
cover the entire viewpoint.&lt;/li&gt;
&lt;li&gt;Validate, validate, validate! Make sure your XHTML is &lt;strong&gt;perfect&lt;/strong&gt;, and that
your pages work in a multitude of browsers.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><category term="XHTML"></category></entry><entry><title>Serving the Correct MIME Type for XHTML using ASP.NET 2.0</title><link href="https://www.mattaustin.me/2006/11/serving-the-correct-mime-type-for-xhtml-using-asp-net-2-0/" rel="alternate"></link><published>2006-11-01T00:04:00+00:00</published><updated>2010-04-12T09:19:24+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2006-11-01:/2006/11/serving-the-correct-mime-type-for-xhtml-using-asp-net-2-0/</id><content type="html">&lt;p&gt;This example code goes some way to serving XHTML properly, as outlined in the
article: &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/serving-the-correct-mime-type-for-xhtml/"&gt;Serving the Correct MIME Type for XHTML&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Idealy, &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt; should only be served when the user agent specifies
acceptance of &lt;tt class="docutils literal"&gt;text/html&lt;/tt&gt;, but not &lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt;. However,
Internet Explorer 6 does not return anything useful in it's &lt;tt class="docutils literal"&gt;HTTP_ACCEPT&lt;/tt&gt;
response.&lt;/p&gt;
&lt;p&gt;Place the following code in the &lt;tt class="docutils literal"&gt;Page_Init&lt;/tt&gt; section of your master page:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;String&lt;/span&gt; &lt;span class="n"&gt;strContentType&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Determine if the user agent returns any AcceptTypes (HTTP_ACCEPT) response&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AcceptTypes&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Determine if the user agent can handle XHTML served as &amp;quot;application/xhtml+xml&amp;quot; (e.g. FireFox, Opera)&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IndexOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AcceptTypes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;application/xhtml+xml&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;strContentType&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;application/xhtml+xml&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;else&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// If the user agent does not specifiy acceptence of &amp;quot;application/xhtml+xml&amp;quot;, then serve as &amp;quot;text/html&amp;quot; (e.g. Internet Explorer)&lt;/span&gt;
    &lt;span class="n"&gt;strContentType&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;text/html&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// If AcceptTypes is null, then serve as &amp;quot;application/xhtml+xml&amp;quot; (e.g. W3C Validator)&lt;/span&gt;
  &lt;span class="n"&gt;strContentType&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;application/xhtml+xml&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Set the Response Content Type&lt;/span&gt;
&lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ContentType&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;strContentType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToString&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strContentType&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;text/html&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Generate a &amp;quot;content-type&amp;quot; meta tag in the page head&lt;/span&gt;
  &lt;span class="n"&gt;HtmlMeta&lt;/span&gt; &lt;span class="n"&gt;hmtContentType&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;HtmlMeta&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;hmtContentType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HttpEquiv&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;content-type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;hmtContentType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Content&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;strContentType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;; charset=UTF-8&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Controls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hmtContentType&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Generate xml declaration&lt;/span&gt;
  &lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;lt;?xml version=&amp;quot;&lt;/span&gt;&lt;span class="m"&gt;1.0&lt;/span&gt;&lt;span class="s"&gt;&amp;quot; encoding=&amp;quot;&lt;/span&gt;&lt;span class="n"&gt;UTF&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;&lt;span class="s"&gt;&amp;quot; ?&amp;gt;&lt;/span&gt;
&lt;span class="s"&gt;&amp;quot;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Set the page encoding&lt;/span&gt;
&lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ContentEncoding&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Encoding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UTF8&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Send a Vary header to inform proxy servers that content negotiation is taking place&lt;/span&gt;
&lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Vary&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;Accept&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="section" id="note"&gt;
&lt;h2&gt;Note&lt;/h2&gt;
&lt;p&gt;When served as &lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt;, all &lt;tt class="docutils literal"&gt;&amp;lt;style&amp;gt;&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;&amp;lt;script&amp;gt;&lt;/tt&gt; in
the &lt;abbr title="eXtensible HyperText Markup Language"&gt;XHTML&lt;/abbr&gt; document must be
marked as &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/marking-script-and-style-as-cdata/"&gt;CDATA&lt;/a&gt;.
Because ASP.NET automatically generates JavaScript, this can be a problem. See
&lt;a class="reference external" href="https://www.mattaustin.me/2006/11/marking-asp-net-2-0-generated-javascript-as-cdata/"&gt;Marking ASP.NET 2.0 Generated JavaScript as CDATA&lt;/a&gt;
for a workaround.&lt;/p&gt;
&lt;/div&gt;
</content><category term="ASP.NET"></category></entry><entry><title>Marking ASP.NET 2.0 Generated JavaScript as CDATA</title><link href="https://www.mattaustin.me/2006/11/marking-asp-net-2-0-generated-javascript-as-cdata/" rel="alternate"></link><published>2006-11-01T00:03:00+00:00</published><updated>2010-04-12T09:19:19+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2006-11-01:/2006/11/marking-asp-net-2-0-generated-javascript-as-cdata/</id><content type="html">&lt;p&gt;The following code example is a workaround for marking ASP.NET generated
JavaScript as &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/marking-script-and-style-as-cdata/"&gt;CDATA&lt;/a&gt;, which is
required when serving &lt;abbr title="eXtensible HyperText Markup Language"&gt;XHTML&lt;/abbr&gt;
ASP.NET 2.0 pages as &lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt; (see &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/serving-the-correct-mime-type-for-xhtml-using-asp-net-2-0/"&gt;Serving the Correct MIME
Type for XHTML using ASP.NET 2.0&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Place the following code in your master page:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;protected&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HtmlTextWriter&lt;/span&gt; &lt;span class="n"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;StringWriter&lt;/span&gt; &lt;span class="n"&gt;stwHtml&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;StringWriter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;HtmlTextWriter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stwHtml&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="n"&gt;String&lt;/span&gt; &lt;span class="n"&gt;strHtml&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;stwHtml&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToString&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="c1"&gt;// Enclose ASP.NET generated client ECMAScript / JavaScript in CDATA Wrapper&lt;/span&gt;
  &lt;span class="n"&gt;Regex&lt;/span&gt; &lt;span class="n"&gt;regScriptCDATA&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Regex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;(&amp;lt;script\stype=&amp;quot;&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="p"&gt;/....&lt;/span&gt;&lt;span class="n"&gt;script&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;gt;(?:\s)*?)&amp;quot;&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;(?:&amp;lt;!--\s)&amp;quot;&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;((?:.|&lt;/span&gt;
&lt;span class="p"&gt;)*?)&lt;/span&gt;&lt;span class="s"&gt;&amp;quot; + &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;(?:&lt;/span&gt;&lt;span class="c1"&gt;// --&amp;gt;)&amp;quot; + &amp;quot;((?:\s)*?&amp;lt;\/script&amp;gt;)&amp;quot;);&lt;/span&gt;
  &lt;span class="n"&gt;String&lt;/span&gt; &lt;span class="n"&gt;strScriptCDATA&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;$1&amp;quot;&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;&amp;lt;!--//--&amp;gt;&amp;lt;![CDATA[//&amp;gt;&amp;lt;!--&lt;/span&gt;
&lt;span class="s"&gt;&amp;quot; + &amp;quot;&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="s"&gt;&amp;quot; + &amp;quot;&lt;/span&gt;
&lt;span class="c1"&gt;//--&amp;gt;&amp;lt;!]]&amp;gt;&amp;quot; + &amp;quot;$3&amp;quot;;&lt;/span&gt;

  &lt;span class="n"&gt;strHtml&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;regScriptCDATA&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strHtml&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strScriptCDATA&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


  &lt;span class="n"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strHtml&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You may need to add the following at the beginning of your master page code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.IO&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Text.RegularExpressions&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
</content><category term="ASP.NET"></category></entry><entry><title>Marking Script and Style as CDATA</title><link href="https://www.mattaustin.me/2006/11/marking-script-and-style-as-cdata/" rel="alternate"></link><published>2006-11-01T00:02:00+00:00</published><updated>2012-01-19T00:37:32+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2006-11-01:/2006/11/marking-script-and-style-as-cdata/</id><content type="html">&lt;p&gt;When using &lt;abbr title="eXtensible HyperText Markup Language"&gt;XHTML&lt;/abbr&gt;, the contents
of &lt;tt class="docutils literal"&gt;&amp;lt;script&amp;gt;&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;&amp;lt;style&amp;gt;&lt;/tt&gt; elements must be marked as CDATA. This is
essential when &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/serving-the-correct-mime-type-for-xhtml/"&gt;serving XHTML correctly&lt;/a&gt; (as
&lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt;).&lt;/p&gt;
&lt;p&gt;When possible, use external script and style files and reference these from
your &lt;abbr title="eXtensible HyperText Markup Language"&gt;XHTML&lt;/abbr&gt; document (behavioural
and presentational separation). However, the examples below show how to place
&lt;tt class="docutils literal"&gt;&amp;lt;script&amp;gt;&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;&amp;lt;style&amp;gt;&lt;/tt&gt; inside your
&lt;abbr title="eXtensible HyperText Markup Language"&gt;XHTML&lt;/abbr&gt; document correctly. This
method should be compatible with older browsers, and therefore degrades
gracefully.&lt;/p&gt;
&lt;div class="section" id="marking-script-as-cdata"&gt;
&lt;h2&gt;Marking &lt;tt class="docutils literal"&gt;&amp;lt;script&amp;gt;&lt;/tt&gt; as CDATA:&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!--&lt;/span&gt;&lt;span class="c1"&gt;//--&amp;gt;&amp;lt;![CDATA[//&amp;gt;&amp;lt;!--&lt;/span&gt;
    &lt;span class="p"&gt;......&lt;/span&gt;
  &lt;span class="c1"&gt;//--&amp;gt;&amp;lt;!]]&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="marking-style-as-cdata"&gt;
&lt;h2&gt;Marking &lt;tt class="docutils literal"&gt;&amp;lt;style&amp;gt;&lt;/tt&gt; as CDATA:&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="nt"&gt;--&lt;/span&gt;&lt;span class="c"&gt;/*--&amp;gt;&amp;lt;![CDATA[/*&amp;gt;&amp;lt;!-- */&lt;/span&gt;
    &lt;span class="o"&gt;......&lt;/span&gt;
  &lt;span class="c"&gt;/*]]&amp;gt;*/&lt;/span&gt;&lt;span class="nt"&gt;--&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="section" id="asp-net-2-0"&gt;
&lt;h3&gt;ASP.NET 2.0&lt;/h3&gt;
&lt;p&gt;If you are serving ASP.NET pages as &lt;tt class="docutils literal"&gt;application/xhtml+xml&lt;/tt&gt; (see &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/serving-the-correct-mime-type-for-xhtml-using-asp-net-2-0/"&gt;Serving the
Correct MIME Type for XHTML using ASP.NET 2.0&lt;/a&gt;
), then the automatically generated JavaScript &lt;strong&gt;will not&lt;/strong&gt; be marked as CDATA,
and will therefore not work. For a workaround see: &lt;a class="reference external" href="https://www.mattaustin.me/2006/11/marking-asp-net-2-0-generated-javascript-as-cdata/"&gt;Marking ASP.NET 2.0
Generated JavaScript as CDATA&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><category term="XHTML"></category></entry><entry><title>The Importance of Standards Compliance and Accessibility</title><link href="https://www.mattaustin.me/2006/11/the-importance-of-standards-compliance-and-accessibility/" rel="alternate"></link><published>2006-11-01T00:01:00+00:00</published><updated>2010-04-12T09:19:08+00:00</updated><author><name>Matt</name></author><id>tag:www.mattaustin.me,2006-11-01:/2006/11/the-importance-of-standards-compliance-and-accessibility/</id><content type="html">&lt;p&gt;The aim of this article is to underline the importance of standards compliant
web pages in promoting &lt;strong&gt;usability&lt;/strong&gt;, &lt;strong&gt;compatibility&lt;/strong&gt;, and &lt;strong&gt;accessibility&lt;/strong&gt;
- therefore allowing &lt;strong&gt;equal opportunity&lt;/strong&gt; and &lt;strong&gt;equal access&lt;/strong&gt; to content for
all.&lt;/p&gt;
&lt;div class="section" id="a-history-of-non-compliance"&gt;
&lt;h2&gt;A History of Non-Compliance&lt;/h2&gt;
&lt;p&gt;When &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Netscape_(web_browser)"&gt;Netscape&lt;/a&gt; lost
the &amp;quot;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/Browser_wars"&gt;Browser Wars&lt;/a&gt;&amp;quot; in April
2002, Internet Explorer was in complete dominance of the web browser market -
with a &lt;strong&gt;96%&lt;/strong&gt; share (source: OneStat.com). For web developers at the time,
this meant that designing for Internet Explorer was all that mattered. The
dominance of a single web browser led to a disregard for standards compliance.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Accessibility &amp;amp; usability problems when sites were accessed using other
browsers.&lt;/li&gt;
&lt;li&gt;Decreased efficiency due to increased file sizes, and website code not
following a standard set of rules.&lt;/li&gt;
&lt;li&gt;Misuse of HTML as a design tool.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="the-benefits-of-standards-compliance"&gt;
&lt;h2&gt;The Benefits of Standards Compliance&lt;/h2&gt;
&lt;p&gt;The number of different ways to access the internet are increasing. Some of the
less common user agents include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Mobile phones&lt;/li&gt;
&lt;li&gt;Televisions&lt;/li&gt;
&lt;li&gt;Text-mode browsers&lt;/li&gt;
&lt;li&gt;Text-to-speach synthesisers&lt;/li&gt;
&lt;li&gt;Braille browsers&lt;/li&gt;
&lt;li&gt;Robots (such as search engine spiders)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Standards compliance can be seen as a way to &amp;quot;future-proof&amp;quot; a website. New
browsers will still correctly render websites constructed using past standards.&lt;/p&gt;
&lt;p&gt;In the United Kingdom and Australia, accessibility is the law. The
implementation of standards is a vital step towards accessibility.
Accessibility benefits those with and without disabilities.&lt;/p&gt;
&lt;p&gt;The use of standards is the only way to ensure that a website is accessible by
all visitors, no matter how they access the web. By ensuring accessibility you
are not neglecting any of your potential visitors.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="summary"&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;Adherence to standards = a big step towards a functional, compatible, and
accessible website.&lt;/p&gt;
&lt;div class="section" id="further-reading"&gt;
&lt;h3&gt;Further Reading&lt;/h3&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://www.w3.org/MarkUp/"&gt;W3C Markup Homepage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://www.w3.org/WAI/"&gt;W3C Web Accessibility Initiative&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://www.webstandards.org/"&gt;The Web Standards Project&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://www.alistapart.com/articles/12lessonsCSSandstandards"&gt;12 Lessons for Those Afraid of CSS and Standards&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://www.karlcore.com/articles/article.php?id=9"&gt;The Importance of Standards Compliance and The Process of Validation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://news.bbc.co.uk/2/hi/programmes/click_online/6090418.stm"&gt;Designing a More Accessible Web&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/Xhtml"&gt;XHTML Wikipedia article&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><category term="XHTML"></category></entry></feed>