<?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/"
	>

<channel>
	<title>Unformatt.com</title>
	<atom:link href="http://unformatt.com/news/feed/" rel="self" type="application/rss+xml" />
	<link>http://unformatt.com/news</link>
	<description>Random.</description>
	<pubDate>Tue, 27 Jul 2010 19:07:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using FTE CFF Font in Flash: Class mx.core::FontAsset could not be found.</title>
		<link>http://unformatt.com/news/using-cff-font-in-flash-class-mxcorefontasset-could-not-be-found/</link>
		<comments>http://unformatt.com/news/using-cff-font-in-flash-class-mxcorefontasset-could-not-be-found/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 19:07:02 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[flash]]></category>

		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/?p=94</guid>
		<description><![CDATA[This happened when I was using a CFF font in a non-Flex project. I compiled my font and the Flex compiler will leave out FontAsset because it thinks the host SWF will have this class - well, not so if it&#8217;s not Flex. So, when compiling your font you have to tell the compiler to [...]]]></description>
			<content:encoded><![CDATA[<p>This happened when I was using a CFF font in a non-Flex project. I compiled my font and the Flex compiler will leave out FontAsset because it thinks the host SWF will have this class - well, not so if it&#8217;s not Flex. So, when compiling your font you have to tell the compiler to include any Flex classes in your font SWF:</p>
<pre>
-static-link-runtime-shared-libraries=true
</pre>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/using-cff-font-in-flash-class-mxcorefontasset-could-not-be-found/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Apache Error: Unknown DAV provider: svn</title>
		<link>http://unformatt.com/news/apache-error-unknown-dav-provider-svn/</link>
		<comments>http://unformatt.com/news/apache-error-unknown-dav-provider-svn/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 19:33:11 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/?p=89</guid>
		<description><![CDATA[This happened after I updated SVN but I guess I didn&#8217;t update some Apache svn mod crap. This also caused a problem with Trac - Unsupported version control system &#8220;svn&#8221;. 
I fixed it on CentOS with a simple:

sudo yum install mod_dav_svn

]]></description>
			<content:encoded><![CDATA[<p>This happened after I updated SVN but I guess I didn&#8217;t update some Apache svn mod crap. This also caused a problem with Trac - Unsupported version control system &#8220;svn&#8221;. </p>
<p>I fixed it on CentOS with a simple:</p>
<pre>
sudo yum install mod_dav_svn
</pre>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/apache-error-unknown-dav-provider-svn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Python mechanize gzip response handling</title>
		<link>http://unformatt.com/news/python-mechanize-gzip-response-handling/</link>
		<comments>http://unformatt.com/news/python-mechanize-gzip-response-handling/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 22:18:27 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/?p=83</guid>
		<description><![CDATA[Mechanize is awesome. The documentation is shit. The gzip support is non-existent. Some sites like Yahoo! require gzip support.

def ungzipResponse(r,b):
	headers = r.info()
	if headers['Content-Encoding']=='gzip':
		import gzip
		gz = gzip.GzipFile(fileobj=r, mode='rb')
		html = gz.read()
		gz.close()
		headers["Content-type"] = "text/html; charset=utf-8"
		r.set_data( html )
		b.set_response(r)

b = Browser()
b.addheaders.append( ['Accept-Encoding','gzip'] )
r = b.open('http://some-gzipped-site.com')
ungzipResponse(r,b)
print r.read()

]]></description>
			<content:encoded><![CDATA[<p>Mechanize is awesome. The documentation is shit. The gzip support is non-existent. Some sites like Yahoo! require gzip support.</p>
<pre>
def ungzipResponse(r,b):
	headers = r.info()
	if headers['Content-Encoding']=='gzip':
		import gzip
		gz = gzip.GzipFile(fileobj=r, mode='rb')
		html = gz.read()
		gz.close()
		headers["Content-type"] = "text/html; charset=utf-8"
		r.set_data( html )
		b.set_response(r)

b = Browser()
b.addheaders.append( ['Accept-Encoding','gzip'] )
r = b.open('http://some-gzipped-site.com')
ungzipResponse(r,b)
print r.read()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/python-mechanize-gzip-response-handling/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash/Flex: VerifyError: Error #1033: Cpool entry is wrong type.</title>
		<link>http://unformatt.com/news/flashflex-verifyerror-error-1033-cpool-entry-is-wrong-type/</link>
		<comments>http://unformatt.com/news/flashflex-verifyerror-error-1033-cpool-entry-is-wrong-type/#comments</comments>
		<pubDate>Mon, 10 May 2010 19:47:04 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/?p=66</guid>
		<description><![CDATA[Of course - the damn Cpool! I have no idea what this means but it happens when I compile a Flash 10 SWF with the Flex 4 SDK then accidentally run it in the Flash 9 player. Make sure you&#8217;re running it in Flash 10.
]]></description>
			<content:encoded><![CDATA[<p>Of course - the damn Cpool! I have no idea what this means but it happens when I compile a Flash 10 SWF with the Flex 4 SDK then accidentally run it in the Flash 9 player. Make sure you&#8217;re running it in Flash 10.</p>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/flashflex-verifyerror-error-1033-cpool-entry-is-wrong-type/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Steve Jobs: Ironic Master of DoubleSpeak? (Yes, 1984)</title>
		<link>http://unformatt.com/news/steve-jobs-ironic-master-of-doublespeak-yes-1984/</link>
		<comments>http://unformatt.com/news/steve-jobs-ironic-master-of-doublespeak-yes-1984/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 16:09:52 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/?p=46</guid>
		<description><![CDATA[I&#8217;ve never really written anything on this blog. Just a bunch of code snippets. For whatever reason I felt compelled to say something but maybe today I should have had some coffee before reading Steve Jobs&#8217;s&#8217;s latest Flash bullshit. No idea why SJ was even compelled to write a public message. There&#8217;s no substance here [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never really written anything on this blog. Just a bunch of code snippets. For whatever reason I felt compelled to say something but maybe today I should have had some coffee before reading <a href="http://www.apple.com/hotnews/thoughts-on-flash/">Steve Jobs&#8217;s&#8217;s latest Flash bullshit</a>. No idea why SJ was even compelled to write a public message. There&#8217;s no substance here - it&#8217;s just Steve pointing fingers on the playground. </p>
<p>I don&#8217;t really care if Flash is on the iPhone or not but since I&#8217;m quite familiar with the technology, it&#8217;s an interesting topic to me. Steve should just write his real one-sentence explanation (did Shantanu Narayen make fun of turtlenecks?) but instead he spews an essay of bull crap.</p>
<blockquote><p>why we do not allow Flash on iPhones, iPods and iPads&#8230;is based on technology issues</p></blockquote>
<p>So, admittedly, the iPhone is inferior to other phones because there are plenty of other phones that will be running Flash in 2010.</p>
<blockquote><p>Adobe’s Flash products are 100% proprietary. They are only available from Adobe, and Adobe has sole authority as to their future enhancement, pricing, etc.</p></blockquote>
<p>Remember that company Pystar that tried to sell hardware to run OS X? Stevie did not like that at all. Only Stevie is allowed to sell proprietary hardware and software at a huge markup. I won&#8217;t argue whether or not Flash or the player should be considered &#8220;proprietary&#8221; and not &#8220;open&#8221; because while the official player is not open-source, many Flash-related things are. </p>
<p>So, as it is right now, the iPhone does not like to support any proprietary technology. (Sarcasm intended)</p>
<p>This <a href="http://apple.slashdot.org/comments.pl?sid=1635814&#038;cid=32030576">Slashdot comment</a> puts it well:</p>
<blockquote><p>
Exactly, and the software/iPhone is not only proprietary, but actually  restricted too. It&#8217;s even worse than just proprietary software.</p>
<p>- Open source: Nobody restricts where you can install the application, and you get the source code too &#8212; the best situation.<br />
- Proprierary software: You dont get the source code, but nobody is restricting where or if you can install it, as long as its freeware or you have paid for it.<br />
- Apple: Not only will you not get the source code and in most cases you have to pay for it, Apple is in total control what applications the user is allowed to install. They dont even give you the option to decide yourself.</p>
<p>If you want to sell your software in App Store, you are not allowed to redistribute the source code or your app outside of it.</p>
<p>While certainly true, making a comment about Flash being proprietary is just hypocrisy and at the same time hilarious from Steve Jobs and Apple.</p></blockquote>
<p>Back to Steve&#8230;</p>
<blockquote><p>Apple has many proprietary products too. Though the operating system for the iPhone, iPod and iPad is proprietary, we strongly believe that all standards pertaining to the web should be open.</p></blockquote>
<p>Stevie will be closed and proprietary where he sees fit - let&#8217;s just confirm - he not actually against being closed and proprietary. That&#8217;s cool, it&#8217;s his platform. Let&#8217;s just not make up bullshit reasons, Stevie.</p>
<blockquote><p>Apple even creates open standards for the web&#8230;with a small open source project and created WebKit</p></blockquote>
<p>Stevie, creating a web browser is not <i>creating</i> a standard. Your web browser is <i>adopting</i> standards.</p>
<blockquote><p>almost all this video is also available in a more modern format, H.264</p></blockquote>
<p>Ah, the good ol&#8217;, <a href="http://www.streamingmedia.com/Articles/ReadArticle.aspx?ArticleID=65357">open-source, patent-free, license-free</a> H.264. </p>
<p>Hiliarous - where are your footnotes Steve? Just because most videos are on YouTube means most of the videos on the internet are available in H.264? </p>
<blockquote><p>iPad offering perhaps the best YouTube discovery and viewing experience ever</p></blockquote>
<p>Thank you for tossing in some signature hyperbole. How long did I have to wait to even see YouTube comments on my iPhone? Cutting edge shit.</p>
<blockquote><p>video from Vimeo, Netflix, Facebook, ABC, CBS, CNN, MSNBC, Fox News, ESPN, NPR, Time, The New York Times, The Wall Street Journal, Sports Illustrated, People, National Geographic, and many, many others.</p></blockquote>
<p>So, instead of Apple putting in some work to adopt Flash, they put all the work onto the content creators to make their sites work correctly with the iPhone - or better yet make a custom iPhone app. Well, at least they can use CS5 to streamline the process of making their Flash website for the iPhone. Oh wait.</p>
<blockquote><p>We also know first hand that Flash is the number one reason Macs crash&#8230;We don’t want to reduce the reliability and security of our iPhones, iPods and iPads by adding Flash.</p></blockquote>
<p>This is understandable. My iPhone already crashes all the time without the help of Apple ignoring Adobe&#8217;s needs to integrate with OS APIs. I guess if my phone can&#8217;t open Google Maps without freezing for 20 seconds, then Steve is right: I don&#8217;t know how it would run Flash.</p>
<blockquote><p> on an iPhone, for example, H.264 videos play for up to 10 hours</p></blockquote>
<p>I&#8217;m lucky if I get 10 hrs of email and web on my iPhone. I guess checking email is more intense than video decoding. Tethering eats a shitload of battery too. Yea, Stevie, I jailbroke your shit.</p>
<blockquote><p>When websites re-encode their videos using H.264, they can offer them without using Flash at all.</p></blockquote>
<p>Yes. When other people do extra work while Steve is playing golf, everyone wins. Ok, I take that one back. Steve wouldn&#8217;t play golf, he&#8217;s more of a Jai Alai player.</p>
<blockquote><p>Apple’s revolutionary multi-touch interface&#8230;there is no concept of a rollover.</p></blockquote>
<p>&#8220;Revolutionary&#8221;&#8230;.&#8221;no concept of&#8221;</p>
<blockquote><p>many Flash websites rely on “rollovers”</p></blockquote>
<p>Rollovers are never used in HTML. I&#8217;ve never seen a navigation menu in HTML that reveals on rollover. Ever.</p>
<blockquote><p>If developers need to rewrite their Flash websites, why not use modern technologies like HTML5, CSS and JavaScript?</p></blockquote>
<p>Because the shit is already made Steven! Now they have to recreate their entire site because they had a rollover? You&#8217;re a dick.</p>
<blockquote><p>Flash&#8230;doesn’t support touch based devices</p></blockquote>
<p><a href="http://theflashblog.com/?p=1666">Really?</a></p>
<blockquote><p>Adobe should focus&#8230;less on criticizing Apple for leaving the past behind.</p></blockquote>
<p>Objective-C&#8230;that&#8217;s from what like 1986? HTML is from like 1989? Oh, HTML <b>FIVE</b>; That is new! However, Flash 10: That&#8217;s in the past.</p>
<p>Steve then ends with some bullshit about how you can&#8217;t make good apps with third-party dev tools because they can&#8217;t keep up with platform advancements. Steve does not want some third-party software to get in the way of having basic functionality like copy-and-paste, MMS, or landscape typing. Apple will do just fine making you wait 2 years for that. It does not need your help.</p>
<p>For the record, I own an iPhone but I&#8217;ve never owned an Apple computer for the reasons above. Not until the iPad came out was Apple&#8217;s rabid consumerism so apparent. It was there all along, but the iPad really brought it to light. It&#8217;s just a mobile siphon to your bank account.  &#8220;Think Different&#8221; no longer applies. Jobs doesn&#8217;t want you to think at all, just do as he says, the way he says it and keep buying shit.</p>
<p>Well, I know I&#8217;ll be having a fun time making apps for Android with whatever tools I want. </p>
<p>Sorry about that, back to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/steve-jobs-ironic-master-of-doublespeak-yes-1984/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Change Drupal Theme Based On URL Path</title>
		<link>http://unformatt.com/news/change-drupal-theme-based-on-url-path/</link>
		<comments>http://unformatt.com/news/change-drupal-theme-based-on-url-path/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 18:36:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[hacks]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/?p=39</guid>
		<description><![CDATA[You could spend 9 years looking for a module to do it or you could do this. Put this in your settings.php

$THEME_URLS = array(
	array('/admin','garland'), # Drupal already support admin theme anywho
	array('/users','fancy_user_theme'),
	array('/forum','forums_theme'),
	);
foreach ( $THEME_URLS as $info)
	if ( strpos($_SERVER['REQUEST_URI'],$info[0])===0)
		$conf['theme_default'] = $info[1];

]]></description>
			<content:encoded><![CDATA[<p>You could spend 9 years looking for a module to do it or you could do this. Put this in your settings.php</p>
<pre>
$THEME_URLS = array(
	array('/admin','garland'), # Drupal already support admin theme anywho
	array('/users','fancy_user_theme'),
	array('/forum','forums_theme'),
	);
foreach ( $THEME_URLS as $info)
	if ( strpos($_SERVER['REQUEST_URI'],$info[0])===0)
		$conf['theme_default'] = $info[1];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/change-drupal-theme-based-on-url-path/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Find Biggest MySQL Tables</title>
		<link>http://unformatt.com/news/find-biggest-mysql-tables/</link>
		<comments>http://unformatt.com/news/find-biggest-mysql-tables/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 16:39:22 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/?p=35</guid>
		<description><![CDATA[I found a great snippet for this from Peter Zaitsev. I modified it to show the size in MB instead of GB (Sorry my databases aren&#8217;t that awesome!).  Peter&#8217;s code lists the biggest tables from all databases; I prefer to list tables just for one database so I added a WHERE.

SELECT	concat(table_schema,'.',table_name),
	concat(round(table_rows/1000000,2),'M') rows,
	concat(round(data_length/(1024*1024),2),'MB') DATA,
	concat(round(index_length/(1024*1024),2),'MB') idx,
	concat(round((data_length+index_length)/(1024*1024),2),'MB') [...]]]></description>
			<content:encoded><![CDATA[<p>I found a great snippet for this from <a href="http://www.mysqlperformanceblog.com/2008/02/04/finding-out-largest-tables-on-mysql-server/">Peter Zaitsev</a>. I modified it to show the size in MB instead of GB (Sorry my databases aren&#8217;t that awesome!).  Peter&#8217;s code lists the biggest tables from all databases; I prefer to list tables just for one database so I added a WHERE.</p>
<pre>
SELECT	concat(table_schema,'.',table_name),
	concat(round(table_rows/1000000,2),'M') rows,
	concat(round(data_length/(1024*1024),2),'MB') DATA,
	concat(round(index_length/(1024*1024),2),'MB') idx,
	concat(round((data_length+index_length)/(1024*1024),2),'MB') total_size,
	round(index_length/data_length,2) idxfrac
FROM information_schema.TABLES
WHERE table_schema = 'my_database_name'
ORDER BY data_length+index_length DESC LIMIT 10;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/find-biggest-mysql-tables/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Disable Enter Button for a Form in jQuery</title>
		<link>http://unformatt.com/news/disable-enter-button-for-a-form-in-jquery/</link>
		<comments>http://unformatt.com/news/disable-enter-button-for-a-form-in-jquery/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 21:03:18 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[ajax]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/?p=31</guid>
		<description><![CDATA[
$("#form").keypress(function(e){ return e.which != 13; });

]]></description>
			<content:encoded><![CDATA[<p><code><br />
$("#form").keypress(function(e){ return e.which != 13; });<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/disable-enter-button-for-a-form-in-jquery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Checkboxes and Vertical Text Alignment</title>
		<link>http://unformatt.com/news/checkboxes-and-vertical-text-alignment/</link>
		<comments>http://unformatt.com/news/checkboxes-and-vertical-text-alignment/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 19:58:10 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/checkboxes-and-vertical-text-alignment/</guid>
		<description><![CDATA[You set the vertical-align on the checkbox, not the parent div or the text. Intuitive. Works in Firefox and IE.

&#60;style&#62;
    * {
        font-size: 10px;
    }
    #cb {
        vertical-align: text-bottom;
    [...]]]></description>
			<content:encoded><![CDATA[<p>You set the vertical-align on the checkbox, not the parent div or the text. Intuitive. Works in Firefox and IE.</p>
<pre>
&lt;style&gt;
    * {
        font-size: 10px;
    }
    #cb {
        vertical-align: text-bottom;
        _vertical-align: middle;
        padding: 0 !important;
        margin: 0 !important;
    }
&lt;/style&gt;
&lt;div&gt;
    &lt;input id="cb" type="checkbox"/&gt; Checkbox
&lt;/div&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/checkboxes-and-vertical-text-alignment/feed/</wfw:commentRss>
		</item>
		<item>
		<title>mod_rewrite During Site Maintenance by IP Address</title>
		<link>http://unformatt.com/news/mod_rewrite-during-site-maintenance-by-ip-address/</link>
		<comments>http://unformatt.com/news/mod_rewrite-during-site-maintenance-by-ip-address/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 18:58:50 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[admin]]></category>

		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://unformatt.com/news/mod_rewrite-during-site-maintenance-by-ip-address/</guid>
		<description><![CDATA[If you are performing site maintenance, you can redirect all users to a maintenance page while letting yourself through by IP address:
.htaccess

# If user IP is NOT 123.123.123.123, then redirect to maintenance.html
# (Don't forget to escape the dots)
RewriteCond %{REMOTE_ADDR} !123\\.123\\.123\\.123
RewriteRule .* /maintenance.html [L]

]]></description>
			<content:encoded><![CDATA[<p>If you are performing site maintenance, you can redirect all users to a maintenance page while letting yourself through by IP address:</p>
<p><strong>.htaccess</strong></p>
<pre>
# If user IP is NOT 123.123.123.123, then redirect to maintenance.html
# (Don't forget to escape the dots)
RewriteCond %{REMOTE_ADDR} !123\\.123\\.123\\.123
RewriteRule .* /maintenance.html [L]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://unformatt.com/news/mod_rewrite-during-site-maintenance-by-ip-address/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
