<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>iamnotagoodartist</title>
	
	<link>http://iamnotagoodartist.com</link>
	<description>a blog of creativity</description>
	<lastBuildDate>Thu, 10 May 2012 03:04:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/iamnotagoodartistentries" /><feedburner:info uri="iamnotagoodartistentries" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><feedburner:emailServiceId>iamnotagoodartistentries</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Quick and Dirty Word Frequency Analysis with JavaScript</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/W1yfqai1RCw/</link>
		<comments>http://iamnotagoodartist.com/web/quick-and-dirty-word-frequency-analysis-with-javascript/#comments</comments>
		<pubDate>Mon, 07 May 2012 02:04:05 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[quick and dirty]]></category>
		<category><![CDATA[word frequency analysis]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1792</guid>
		<description><![CDATA[Run this in your browser console to get a readout on which words you (or whoever) need to break out a thesaurus for. Might have gone a little overboard with the modules, but I think it makes it more readable.]]></description>
			<content:encoded><![CDATA[<p><a href="http://iamnotagoodartist.com/wp-content/uploads/2012/05/wordfrequency.jpg"><img src="http://iamnotagoodartist.com/wp-content/uploads/2012/05/wordfrequency.jpg" alt="" title="wordfrequency" width="680" height="383" class="alignnone size-full wp-image-1793" /></a></p>
<p><span id="more-1792"></span></p>
<p>Run this in your browser console to get a readout on which words you (or whoever) need to break out a thesaurus for.</p>
<p><script src="https://gist.github.com/2625413.js"></script></p>
<p>Might have gone a little overboard with the modules, but I think it makes it more readable.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=W1yfqai1RCw:hmlIOen7W0Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=W1yfqai1RCw:hmlIOen7W0Y:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=W1yfqai1RCw:hmlIOen7W0Y:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/W1yfqai1RCw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/web/quick-and-dirty-word-frequency-analysis-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/web/quick-and-dirty-word-frequency-analysis-with-javascript/</feedburner:origLink></item>
		<item>
		<title>A Couple Handy Bookmarklets</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/L5969DuTj8k/</link>
		<comments>http://iamnotagoodartist.com/web/a-couple-handy-bookmarklets/#comments</comments>
		<pubDate>Fri, 04 May 2012 03:05:04 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bookmarklets]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1776</guid>
		<description><![CDATA[Confirm Leave: sure? Will prompt before page unloads. Good for when you&#8217;re filling out a form or something and don&#8217;t want to accidentally close the page. URL Param Cleanup*: ?=? Takes a URL?that=looks&#038;like=this, parses, and returns { "that": "looks", "like": &#8230; <a href="http://iamnotagoodartist.com/web/a-couple-handy-bookmarklets/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://iamnotagoodartist.com/wp-content/uploads/2012/05/somebookmarklets.jpg"><img src="http://iamnotagoodartist.com/wp-content/uploads/2012/05/somebookmarklets-680x383.jpg" alt="" title="Oh, just an obligatory, angled picture of a computer screen!" class="alignnone size-large wp-image-1785" /></a></p>
<p><span id="more-1776"></span></p>
<h2>Confirm Leave: <a href="javascript:(function()%7Bwindow.onbeforeunload%3Dfunction()%7Breturn%20''%3B%7D%7D)()%3B">sure?</a></h2>
<p><script src="https://gist.github.com/2598471.js"> </script></p>
<p>Will prompt before page unloads. Good for when you&#8217;re filling out a form or something and don&#8217;t want to accidentally close the page.</p>
<h2>URL Param Cleanup*: <a href="data:text/html,
<pre id='pre'></pre>
<p> <script> document.getElementById('pre').innerHTML = JSON.stringify( (function(s){ var s = (!!s.match(/\?/)) ? s.substr(s.indexOf('?')+1) : s; var qs = s.split('+').join(' '), params = {}, tokens, re = /[?&#038;]?([^=]+)=([^&#038;]*)/g; while (tokens = re.exec(qs)) { params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]); } return params; } (prompt('?=?'))), null, 4 ); </script>">?=?</a></h2>
<p><script src="https://gist.github.com/2650604.js?file=urlparamcleanup.html"></script></p>
<p>Takes a <code>URL?that=looks&#038;like=this</code>, <a href="http://stackoverflow.com/a/439578">parses</a>, and returns </p>
<pre>{
    "that": "looks",
    "like": "this"
}</pre>
<h2>HTML Prompt*: <a href="data:text/html,Loading...&lt;script&gt;document.body.innerHTML=prompt(%22html?%22)&lt;/script&gt;">html?</a></h2>
<p><script src="https://gist.github.com/2598480.js"> </script></p>
<p>Prompts for and displays your HTML.</p>
<h2>Millisecond Param: <a href="javascript:(function()%7Blocation.search%3D%22%3F%22%2B(%2Bnew%20Date())%3B%7D())">?123</a></h2>
<p><script src="https://gist.github.com/2598516.js"> </script></p>
<p>May or may not bust any caches.</p>
<p><strong>*</strong> These two are data URIs and thus aren't probably technically bookmarklets.</p>
<h2>Oh, and...</h2>
<ul>
<li>My <a href="http://iamnotagoodartist.com/things-i-like/an-auto-updating-data-uri-text-editor/">auto-updating text editor via data URI</a>, relabeled to <code>...</code></li>
<li>My <a href="http://iamnotagoodartist.com/web/add-css-bookmarklet/">addCSS</a> to inject arbitrary CSS</li>
<li><a href="http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet">jQuerify</a> to inject jQuery</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=L5969DuTj8k:_D11fzwvyuk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=L5969DuTj8k:_D11fzwvyuk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=L5969DuTj8k:_D11fzwvyuk:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/L5969DuTj8k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/web/a-couple-handy-bookmarklets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/web/a-couple-handy-bookmarklets/</feedburner:origLink></item>
		<item>
		<title>Passing the OneFileCMS Torch</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/ltIqngI1u5w/</link>
		<comments>http://iamnotagoodartist.com/web/passing-the-onefilecms-torch/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 16:21:23 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[onefilecms]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1773</guid>
		<description><![CDATA[It&#8217;s the nature of making that, as time goes on and mental bandwidth throttles, some projects must fall by the wayside. OneFileCMS, my first project to get any real attention, is one of them. That&#8217;s why I&#8217;m so glad to &#8230; <a href="http://iamnotagoodartist.com/web/passing-the-onefilecms-torch/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s the nature of making that, as time goes on and mental bandwidth throttles, some projects must fall by the wayside. <a href="http://iamnotagoodartist.com/web/onefilecms/">OneFileCMS</a>, my first project to get any real attention, is one of them.</p>
<p>That&#8217;s why I&#8217;m so glad to say that I&#8217;m passing the torch to another developer. <a href="https://github.com/Self-Evident">David</a> is a smart, talented gent and (if his <a href="https://github.com/Self-Evident/OneFileCMS/commits/master">git commits to the project</a> are any indication) is the perfect guy to take over OneFileCMS.</p>
<p>His repo: <a href="https://github.com/Self-Evident/OneFileCMS">https://github.com/Self-Evident/OneFileCMS</a></p>
<p>Thank you, David!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=ltIqngI1u5w:-uM-BmkgSAQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=ltIqngI1u5w:-uM-BmkgSAQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=ltIqngI1u5w:-uM-BmkgSAQ:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/ltIqngI1u5w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/web/passing-the-onefilecms-torch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/web/passing-the-onefilecms-torch/</feedburner:origLink></item>
		<item>
		<title>Cleaner Netflix CSS</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/xYc7bAzoH9Y/</link>
		<comments>http://iamnotagoodartist.com/other/cleaner-netflix-css/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 03:36:18 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[netflix]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1765</guid>
		<description><![CDATA[Instructions: use my Add CSS Bookmarklet]]></description>
			<content:encoded><![CDATA[<p><img src="http://iamnotagoodartist.com/wp-content/uploads/2012/03/netflix.jpg" alt="" title="netflix" width="680" height="308" class="alignnone size-full wp-image-1767" /></p>
<p><span id="more-1765"></span></p>
<p><script src="https://gist.github.com/2200795.js"> </script></p>
<p>Instructions: use my <a href="http://rocktronica.github.com/Add-CSS-Bookmarklet/">Add CSS Bookmarklet</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=xYc7bAzoH9Y:76CDZKaor4E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=xYc7bAzoH9Y:76CDZKaor4E:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=xYc7bAzoH9Y:76CDZKaor4E:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/xYc7bAzoH9Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/other/cleaner-netflix-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/other/cleaner-netflix-css/</feedburner:origLink></item>
		<item>
		<title>iClicks++</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/4-RqoxFZJ4U/</link>
		<comments>http://iamnotagoodartist.com/web/iclicks/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 05:31:18 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jsfiddle]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1756</guid>
		<description><![CDATA[Here now, a quick script to count event occurrences* in real time, without resorting to archaic tally marks.]]></description>
			<content:encoded><![CDATA[<p>Here now, a quick script to count event occurrences* in real time, without resorting to archaic tally marks.</p>
<p><!-- pardon the inline css. it's late and i'm tired. don't tell! --></p>
<p style="margin:0;"><iframe style="width: 100%; height: 300px; margin: 0;" src="http://jsfiddle.net/rocktronica/seHze/embedded/result/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p><small>* What, you ask? Oh, anything, I suppose. <a href="http://en.wikipedia.org/wiki/Disfluency">Speech disfluencies</a>, annoying sounds, the number of times I think about Dorito shell tacos every day, etc.</small></p>
<p><a href="http://jsfiddle.net/rocktronica/seHze/">http://jsfiddle.net/rocktronica/seHze/</a><br />
<a href="https://gist.github.com/2156283">https://gist.github.com/2156283</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=4-RqoxFZJ4U:Ds9qrdK4Fqo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=4-RqoxFZJ4U:Ds9qrdK4Fqo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=4-RqoxFZJ4U:Ds9qrdK4Fqo:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/4-RqoxFZJ4U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/web/iclicks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/web/iclicks/</feedburner:origLink></item>
		<item>
		<title>modglob</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/4QtGk2fOeGk/</link>
		<comments>http://iamnotagoodartist.com/web/modglob/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 01:22:15 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1744</guid>
		<description><![CDATA[Been working on this the last couple days. It&#8217;s &#8220;a trivial but hopefully useful PHP file modification notifier&#8221; that can holler if your files get modified without you knowing. It can be run via browser or command line. https://github.com/rocktronica/modglob Relative &#8230; <a href="http://iamnotagoodartist.com/web/modglob/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/rocktronica/modglob"><img src="http://iamnotagoodartist.com/wp-content/uploads/2012/02/modglob.jpg" alt="" title="modglob" width="680" height="385" class="alignnone size-full wp-image-1745" /></a></p>
<p><span id="more-1744"></span></p>
<p>Been working on this the last couple days. It&#8217;s &#8220;a trivial but hopefully useful PHP file modification notifier&#8221; that can holler if your files get modified without you knowing. It can be run via browser or command line.</p>
<p><a href="https://github.com/rocktronica/modglob">https://github.com/rocktronica/modglob</a></p>
<p>Relative to its location, modglob will recursively check folders for PHP files then order them by their last modification date. You can reselect by those modified within the last hour, day, week, month, infinity.</p>
<h2>URL Params and CLI Arguments</h2>
<ul>
<li><strong>Limit</strong><br />
Number of files and folders to stop at. Default is a ridiculous million.</li>
<li><strong>Hours</strong><br />
Default is 1. Crank it up to 24 if you&#8217;ll be running the script daily, etc.</li>
<li><strong>Format</strong><br />
Options: <em>text</em>, <em>html</em>, <em>dump</em>. Will try to detect and show HTML/text for web/CLI, respectively. Dump is good for testing.</li>
<li><strong>Mail</strong><br />
Give it a valid email address, and it will email the text results. If none, it won&#8217;t. This is handy when the script is run via cron job.</li>
<li><strong>Ignore</strong><br />
Array of folders to ignore if it finds them. I&#8217;ve got a &#8220;cache&#8221; folder with a billion text files in it, so that&#8217;s the default.</li>
</ul>
<p>CLI args are the first letters of each param, hyphened. So:<br />
<code>php modglob.php -h 168 -i foo -l 100</code><br />
will show all files modified within the last week (168 = 24 * 7), ignoring the &#8220;foo&#8221; folder, and stopping when it&#8217;s seen 100 files or folders.</p>
<h2>Attribution, License, Responsibility</h2>
<p>Made with PHP, <a href="http://jquery.com/">jQuery</a>, <a href="http://tinysort.sjeiti.com/">TinySort</a>. Requires PHP5, I&#8217;d bet. MIT/GPL licensed or as components allow.</p>
<p>Please be careful with how you use this. Obviously, indexing a gergillion files on a live server can use up some resources. Try to test in an inconspicuous place first, set proper limit and ignore variables, etc. Always be prepared!</p>
<p>Comments and concerns welcome via the project&#8217;s <a href="https://github.com/rocktronica/modglob/issues">issues page</a>.</p>
<p><strong>Link:</strong> <a href="https://github.com/rocktronica/modglob">https://github.com/rocktronica/modglob</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=4QtGk2fOeGk:cW4fsVwI3Xs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=4QtGk2fOeGk:cW4fsVwI3Xs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=4QtGk2fOeGk:cW4fsVwI3Xs:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/4QtGk2fOeGk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/web/modglob/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/web/modglob/</feedburner:origLink></item>
		<item>
		<title>rocktronica.github.com</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/9Tzk5gGoqiY/</link>
		<comments>http://iamnotagoodartist.com/web/rocktronica-github-com/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 18:16:06 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1720</guid>
		<description><![CDATA[This is my little attempt at a needlessly prettified GitHub profile&#8230; It&#8217;s mostly so I can rest easy knowing my pages apps&#8217; root is something that will tie them all together hierarchically. http://rocktronica.github.com/ Technical Tidbits Apple-ish black linen texture from &#8230; <a href="http://iamnotagoodartist.com/web/rocktronica-github-com/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://rocktronica.github.com/"><img src="http://iamnotagoodartist.com/wp-content/uploads/2012/02/rocktronica.github.com_.jpg" alt="" title="rocktronica.github.com" width="680" height="450" class="alignnone size-full wp-image-1733" /></a></p>
<p><span id="more-1720"></span></p>
<p>This is my little attempt at a needlessly prettified GitHub profile&#8230; It&#8217;s mostly so I can rest easy knowing my <a href="http://pages.github.com/">pages</a> apps&#8217; root is something that will tie them all together hierarchically.</p>
<p><a href="http://rocktronica.github.com/">http://rocktronica.github.com/</a></p>
<h2>Technical Tidbits</h2>
<ul>
<li>Apple-ish black linen texture from <a href="http://subtlepatterns.com/?p=585">Subtle Patterns</a> lazily base64&#8242;d right into style.css</li>
<li>Lots of pseudo selecting table elements to get them to look nice</li>
<li><a href="http://www.google.com/webfonts/specimen/Bitter">Bitter</a> serif font via Google Webfonts</li>
<li>Uses <a href="http://jquery.com/">jQuery</a>, <a href="http://html5boilerplate.com/">h5bp</a>, <a href="https://github.com/douglascrockford/JSON-js">json2</a>, <a href="http://mustache.github.com/">mustache</a>, and <a href="http://leaverou.github.com/prefixfree/">-prefix-free</a></li>
<li>Most of the HTML and CSS written with <a href="http://rocktronica.github.com/tmpltr/">tmpltr</a></li>
<li>Message and Follow buttons are placebos that just link to the normal profile page because:
<ul>
<li>On the GH main site, URIs for following exist but are handled with Ajax and so don&#8217;t degrade. That&#8217;s probably rightfully a very low priority.</li>
<li>Messaging is handled with plaintext email addresses, normally only visible if you&#8217;re logged in. BUT their API shows them w/o authentication. I&#8217;m still hesitant about <code>mailto:</code> links being anywhere near me&#8230;</li>
</ul>
</li>
<li>Data stored w/ localStorage to hopefully minimize requests</li>
<li>Open your JS console to watch the async functions make their requests</li>
<li>URL params for testing other <code>user</code>s and <code>cache</code>.<br />
Ex: <a href="http://rocktronica.github.com/?user=github&#038;cache=false">http://rocktronica.github.com/?user=github&#038;cache=false</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=9Tzk5gGoqiY:1KsXjuGcl0Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=9Tzk5gGoqiY:1KsXjuGcl0Q:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=9Tzk5gGoqiY:1KsXjuGcl0Q:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/9Tzk5gGoqiY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/web/rocktronica-github-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/web/rocktronica-github-com/</feedburner:origLink></item>
		<item>
		<title>An Auto-Updating Data URI Text Editor</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/8k0qlBNaeiA/</link>
		<comments>http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 21:26:34 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[data uri]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[text editor]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1689</guid>
		<description><![CDATA[tl;dr: Click this, type some stuff, watch the URL, and then come back if you&#8217;re curious as to what&#8217;s going on. Ok, quick recap: Data URIs allow for inline resource inclusion without additional HTTP requests. Among other things, this allows &#8230; <a href="http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>tl;dr: Click <a href="data:text/html,&lt;body id='b'&gt;&lt;textarea spellcheck=%22false%22 id=%22t%22&gt;&lt;/textarea&gt;&lt;script&gt;var f, t=document.getElementById(%22t%22), b=document.body, v=t.value, c=parseInt(b.getAttribute(%22c%22)) || t.value.length;t.focus();document.title=t.value.split(%22\n%22)[0] || %22...%22;t.className=%22s%22;function updateUrl(){clearInterval(f);f=setTimeout(function(){if (v===t.value){return false;}t.className=%22%22;t.innerHTML=encodeURIComponent(t.value);var s=%22data:text/html,&lt;body id='b'%22;if (!!t.selectionStart){s +=%22 c='%22 + t.selectionStart + %22'%22;}s +=%22&gt;%22 + b.innerHTML;window.location.href=s;}, 500);}t.addEventListener(%22keyup%22, updateUrl);if (!!t.setSelectionRange){t.setSelectionRange(c,c);setTimeout(function(){t.setSelectionRange(c,c);}, 10);}&lt;/script&gt;&lt;style&gt;textarea{position: fixed;top: 0;left: 0;width: 100%;height: 100%;overflow: auto;margin: 0;padding: 10px;background: black;font: 14px/20px monospace;outline: none;border: none;box-sizing: border-box;cursor: wait;color: gray;}textarea.s{cursor: text;color: white;}&lt;/style&gt;&lt;!--http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor --&gt;">this</a>, type some stuff, watch the URL, and then come back if you&#8217;re curious as to what&#8217;s going on.</p>
<p><a href="data:text/html,&lt;body id='b'&gt;&lt;textarea spellcheck=%22false%22 id=%22t%22&gt;&lt;/textarea&gt;&lt;script&gt;var f, t=document.getElementById(%22t%22), b=document.body, v=t.value, c=parseInt(b.getAttribute(%22c%22)) || t.value.length;t.focus();document.title=t.value.split(%22\n%22)[0] || %22...%22;t.className=%22s%22;function updateUrl(){clearInterval(f);f=setTimeout(function(){if (v===t.value){return false;}t.className=%22%22;t.innerHTML=encodeURIComponent(t.value);var s=%22data:text/html,&lt;body id='b'%22;if (!!t.selectionStart){s +=%22 c='%22 + t.selectionStart + %22'%22;}s +=%22&gt;%22 + b.innerHTML;window.location.href=s;}, 500);}t.addEventListener(%22keyup%22, updateUrl);if (!!t.setSelectionRange){t.setSelectionRange(c,c);setTimeout(function(){t.setSelectionRange(c,c);}, 10);}&lt;/script&gt;&lt;style&gt;textarea{position: fixed;top: 0;left: 0;width: 100%;height: 100%;overflow: auto;margin: 0;padding: 10px;background: black;font: 14px/20px monospace;outline: none;border: none;box-sizing: border-box;cursor: wait;color: gray;}textarea.s{cursor: text;color: white;}&lt;/style&gt;&lt;!--http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor --&gt;"><img src="http://iamnotagoodartist.com/wp-content/uploads/2012/01/datauritexteditor.jpg" alt="" title="datauritexteditor" width="680" height="450" class="alignnone size-full wp-image-1699" /></a></p>
<p><span id="more-1689"></span>Ok, quick recap:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Data_URI_scheme">Data URIs</a> allow for inline resource inclusion without additional HTTP requests. Among other things, this allows for <a href="data:text/html,Hello%20world.">writing content directly to the address bar</a>, and it&#8217;s the way my <a href="http://tmpltr.com/">tmpltr</a> app exports stuff.</li>
<li>HTML5 has a <code>contentEditable</code> attribute that can turn anything into an input.</li>
<li>And somebody clever (<a href="http://www.xanthir.com/">@tabatkins</a>, <a href="https://twitter.com/#!/paul_irish/status/163692631128424449">according to @paul_irish</a>) took to combining the two to make &#8220;<a href="https://news.ycombinator.com/item?id=3333155">the world&#8217;s smallest text editor</a>&#8220;:
<pre><a href="data:text/html,&lt;pre contenteditable&gt;%20&lt;/pre&gt;">data:text/html,&lt;pre contenteditable&gt;&lt;/pre&gt;</a></li>
</ul>
<p>I was pretty enamored by that and used a variant of it at work for awhile to jot down my notes during the day. Like all tinkerers, I couldn't leave well enough alone, and so here's my fancier but definitely-not-the-smallest-and-so-not-as-novel version:</p>
<p><script src="https://gist.github.com/1700623.js"> </script></p>
<p>Clickable:<br />
<a style="display:block;font:11px/15px monospace" href="data:text/html,&lt;body id='b'&gt;&lt;textarea spellcheck=%22false%22 id=%22t%22&gt;&lt;/textarea&gt;&lt;script&gt;var f, t=document.getElementById(%22t%22), b=document.body, v=t.value, c=parseInt(b.getAttribute(%22c%22)) || t.value.length;t.focus();document.title=t.value.split(%22\n%22)[0] || %22...%22;t.className=%22s%22;function updateUrl(){clearInterval(f);f=setTimeout(function(){if (v===t.value){return false;}t.className=%22%22;t.innerHTML=encodeURIComponent(t.value);var s=%22data:text/html,&lt;body id='b'%22;if (!!t.selectionStart){s +=%22 c='%22 + t.selectionStart + %22'%22;}s +=%22&gt;%22 + b.innerHTML;window.location.href=s;}, 500);}t.addEventListener(%22keyup%22, updateUrl);if (!!t.setSelectionRange){t.setSelectionRange(c,c);setTimeout(function(){t.setSelectionRange(c,c);}, 10);}&lt;/script&gt;&lt;style&gt;textarea{position: fixed;top: 0;left: 0;width: 100%;height: 100%;overflow: auto;margin: 0;padding: 10px;background: black;font: 14px/20px monospace;outline: none;border: none;box-sizing: border-box;cursor: wait;color: gray;}textarea.s{cursor: text;color: white;}&lt;/style&gt;&lt;!--http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor --&gt;">data:text/html,&lt;body id='b'&gt;&lt;textarea spellcheck=%22false%22 id=%22t%22&gt;&lt;/textarea&gt;&lt;script&gt;var f, t=document.getElementById(%22t%22), b=document.body, v=t.value, c=parseInt(b.getAttribute(%22c%22)) || t.value.length;t.focus();document.title=t.value.split(%22\n%22)[0] || %22...%22;t.className=%22s%22;function updateUrl(){clearInterval(f);f=setTimeout(function(){if (v===t.value){return false;}t.className=%22%22;t.innerHTML=encodeURIComponent(t.value);var s=%22data:text/html,&lt;body id='b'%22;if (!!t.selectionStart){s +=%22 c='%22 + t.selectionStart + %22'%22;}s +=%22&gt;%22 + b.innerHTML;window.location.href=s;}, 500);}t.addEventListener(%22keyup%22, updateUrl);if (!!t.setSelectionRange){t.setSelectionRange(c,c);setTimeout(function(){t.setSelectionRange(c,c);}, 10);}&lt;/script&gt;&lt;style&gt;textarea{position: fixed;top: 0;left: 0;width: 100%;height: 100%;overflow: auto;margin: 0;padding: 10px;background: black;font: 14px/20px monospace;outline: none;border: none;box-sizing: border-box;cursor: wait;color: gray;}textarea.s{cursor: text;color: white;}&lt;/style&gt;&lt;!--http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor --&gt;</a></p>
<h2>Breakdown</h2>
<p>Mine uses a <code>textarea</code> instead of a <code>contenteditable &lt;pre&gt;</code>, since it's made to be fullscreen and thus doesn't need <code>contenteditable</code>'s auto-adjustment to variably dimensioned content. (Actually, the one regret is that my text editor now won't use any of the HTML5 spec and so is not as trendy... Sniffle, sniffle.)</p>
<p>So we've got a fixed and fullscreen input. We'll use its first line (if it has one) as the document title and bind a debounced* function to its <code>keyup</code> event. When the function executes successfully, we write a new URL using the existing body's HTML, the input's encoded value, and its caret/selection position, and then we'll redirect the user to it, setting the caret position and repeating the process indefinitely.</p>
<p><small>* Debouncing is a method of rate limiting. It takes a time duration and waits that long after each firing to run, resetting and delaying execution if fired before the duration is up. Its more common sibling is throttling, which will run at most once per time duration while firing and will not reset.</small></p>
<h3>Unordered, Non-Narrative Findings</h3>
<ul>
<li>If the software and its data share the same limited storage mechanism, brevity must trump legacy support: no CSS3 vendor prefixes, not a lot of feature sniffing or graceful degradation, etc. All JS is vanilla and doesn't use external libraries.</li>
<li>Like local files, Data URIs are prohibited from a number of things for security reasons; cookies, localStorage/sessionStorage, and any history manipulation are out the window. Thus, there's no saving beyond the URL and updates happen with old-fashioned redirects instead of the cooler <a href=">https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history"><code>pushState</code></a>.</li>
<li>I'm storing caret position as just a <code>c</code> attribute to save some bytes. There may be a better way to do it, and I'm not sure what the technical implications are for arbitrary attributes like that instead of, say, a <a href="http://dev.w3.org/html5/spec/global-attributes.html#embedding-custom-non-visible-data-with-the-data-attributes">data attribute</a>.</li>
<li>Dirty/clean save status is handled with a CSS class to gray out the text and use the <strong style="cursor:wait;">wait cursor</strong>. May be overkill.</span>
<li><code>textarea</code>s have both <code>value</code> and <code>innerHTML</code>. At init they are the same, but only <code>value</code> changes as the user interacts with it; no HTML is changed. Because we're using the body's <code>innerHTML</code> to rewrite the URL, we must set the input's <code>innerHTML</code> to its <code>value</code>, <code>encodeURIComponent</code>ed for safety.</li>
<li>Nobody will call the cops if you don't close your <code>body</code> tag.</li>
</ul>
<h4>Still Could Use...</h4>
<ul>
<li>Different browsers have different URL limits. Ideally, this would have some sort of reservoir meter.</li>
<li>Code and markup is properly escaped, but trying to save anything with <code>&lt;/textarea&gt;</code> will effectively close the input and bork all the text thereafter. It escapes me how to get around that at the moment...</li>
<li>Safari takes a couple microseconds to focus an element and won't allow caret setting while it's unfocused, so there's some awkward and redundant <code>setTimeout</code> stuff in there to give it some time. I'd like for that to be less crummy.</li>
</ul>
<h4>Unavoidable Gotchas</h4>
<ul>
<li><a href="http://caniuse.com/datauri">Data URIs aren't supported in IE</a>. Tested successfully in Chrome, Firefox, Safari, and Opera.</li>
<li>Undo and redo can't persist over redirect. (But, interestingly, you can use native back and forward to kind of view the text's history.)</li>
<li>Browsers can interpret Data URIs, yes, but most software won't automatically turn them into links like traditional HTTP URLs. So copy-and-pasting into chats will always have to be prefaced with "Hey, copypaste this into a new tab, k?"</li>
</ul>
<h2>How is this useful?</h2>
<p>Honestly? Probably only as an academic pursuit.</p>
<p>But try this: <a href="data:text/html,<body id='b'><textarea spellcheck=%22false%22 id=%22t%22></textarea><script>var f, t=document.getElementById(%22t%22), b=document.body, v=t.value, c=parseInt(b.getAttribute(%22c%22)) || t.value.length;t.focus();document.title=t.value.split(%22\n%22)[0] || %22...%22;t.className=%22s%22;function updateUrl(){clearInterval(f);f=setTimeout(function(){if (v===t.value){return false;}t.className=%22%22;t.innerHTML=encodeURIComponent(t.value);var s=%22data:text/html,<body id='b'%22;if (!!t.selectionStart){s +=%22 c='%22 + t.selectionStart + %22'%22;}s +=%22>%22 + b.innerHTML;window.location.href=s;}, 500);}t.addEventListener(%22keyup%22, updateUrl);if (!!t.setSelectionRange){t.setSelectionRange(c,c);setTimeout(function(){t.setSelectionRange(c,c);}, 10);}</script><br />
<style>textarea{position: fixed;top: 0;left: 0;width: 100%;height: 100%;overflow: auto;margin: 0;padding: 10px;background: black;font: 14px/20px monospace;outline: none;border: none;box-sizing: border-box;cursor: wait;color: gray;}textarea.s{cursor: text;color: white;}</style>
<p><!--http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor -->">open it up</a> and write something, copy the URL and paste it into another tab or browser. Your text persisted without a database, any external script, or proprietary Cloud gizmo. No legal order can cease it to exist, and you didn't even need an internet connection. I think that's pretty neat!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=8k0qlBNaeiA:RVWyNuJqvIs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=8k0qlBNaeiA:RVWyNuJqvIs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=8k0qlBNaeiA:RVWyNuJqvIs:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/8k0qlBNaeiA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor/</feedburner:origLink></item>
		<item>
		<title>Shipped to the Internet</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/njwatxK7uBI/</link>
		<comments>http://iamnotagoodartist.com/other/shipped-to-the-internet/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 17:40:03 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1681</guid>
		<description><![CDATA[Font: Carton]]></description>
			<content:encoded><![CDATA[<p><a href="http://iamnotagoodartist.com/wp-content/uploads/2012/01/shippedtotheinternet.jpg"><img src="http://iamnotagoodartist.com/wp-content/uploads/2012/01/shippedtotheinternet-536x402.jpg" alt="" title="shippedtotheinternet" width="536" height="402" class="alignnone size-large wp-image-1682" /></a></p>
<p>Font: <a href="http://www.losttype.com/font/?name=carton">Carton</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=njwatxK7uBI:eq4WnmWj2Yc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=njwatxK7uBI:eq4WnmWj2Yc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=njwatxK7uBI:eq4WnmWj2Yc:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/njwatxK7uBI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/other/shipped-to-the-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/other/shipped-to-the-internet/</feedburner:origLink></item>
		<item>
		<title>Suits</title>
		<link>http://feedproxy.google.com/~r/iamnotagoodartistentries/~3/_ki8cyoct18/</link>
		<comments>http://iamnotagoodartist.com/other/suits/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 03:46:35 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://iamnotagoodartist.com/?p=1677</guid>
		<description><![CDATA[My girlfriend and I are at the airport. There are men in nice suits there, waiting for their flights. &#8220;I want you to be so rich you can wear suits like those,&#8221; she says. &#8220;I want to be so rich &#8230; <a href="http://iamnotagoodartist.com/other/suits/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My girlfriend and I are at the airport. There are men in nice suits there, waiting for their flights.</p>
<p>&#8220;I want you to be so rich you can wear suits like those,&#8221; she says.</p>
<p>&#8220;I want to be so rich I never have to,&#8221; I respond.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=_ki8cyoct18:z_T0-9ZDemk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?a=_ki8cyoct18:z_T0-9ZDemk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/iamnotagoodartistentries?i=_ki8cyoct18:z_T0-9ZDemk:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/iamnotagoodartistentries/~4/_ki8cyoct18" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://iamnotagoodartist.com/other/suits/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://iamnotagoodartist.com/other/suits/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.496 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-05-14 08:49:19 -->

