<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ReadyState4 &#187; Uncategorized</title>
	<atom:link href="http://readystate4.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://readystate4.com</link>
	<description>JavaScript, Web Development, Ruby, and Technology.</description>
	<lastBuildDate>Fri, 27 Jan 2012 18:37:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Setting up and using a git wrapper around SVN with git-svn</title>
		<link>http://readystate4.com/2012/01/27/setting-up-and-using-a-git-wrapper-around-svn-with-git-svn/</link>
		<comments>http://readystate4.com/2012/01/27/setting-up-and-using-a-git-wrapper-around-svn-with-git-svn/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 18:29:21 +0000</pubDate>
		<dc:creator>Mauvis</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://readystate4.com/?p=404</guid>
		<description><![CDATA[Note: I wrote this post a long time ago but never got around to posting it. A lot of these steps are applicable to porting an SVN repo to Git as well. Preface on why I love git Roughly four years ago I switched to git for version control and it&#8217;s changed my development life. [...]]]></description>
			<content:encoded><![CDATA[<p>Note: I wrote this post a long time ago but never got around to posting it. A lot of these steps are applicable to porting an SVN repo to Git as well.</p>
<h3>Preface on why I love git</h3>
<p>Roughly four years ago I switched to <a href="http://git-scm.com/">git</a> for version control and it&#8217;s changed my development life. While SVN is sufficient to &#8220;get the job done&#8221; in terms of keeping a history of your commits with a group of people, Git is truly the next evolutionary step up in every way. I could expound a whole article on the joy of git, but many others already have, and this articles not about that. But I will kindly throw in my 0.02 on why I personally love it:</p>
<ul>
<li>It&#8217;s fast. Git keeps your whole repo&#8217;s history local. So no need to ping your repo server for every command. You can even checkout your codebase from 3 weeks ago or a year ago in under a second.&#8221;</li>
<li>It works offline. That&#8217;s right, no internet. Sync up later.</li>
<li>It has useful modern tools. Like <a href="http://ariejan.net/2008/04/23/git-using-the-stash/">git stash</a> and <a href="http://readystate4.com/2010/12/05/the-wonders-of-git-bisect/">git bisect</a>. Both will save you a lot of time.</li>
<li>It&#8217;s your third hand. Let&#8217;s face it, besides svn being slow, it&#8217;s not friendly enough to do more than throw your past commits into an empty hole you will probably never see again. With <a href="http://jblevins.org/notes/git-colors">very little setup</a>, you have beautiful colored output in your logs and diffs with git. And &#8220;git log&#8221; actually pages by default (while keeping colors) instead of flooding your console with the entire repos history! Want to query something in your history log? What about all commits from your friend Bob in the past 2 weeks?
<pre class="bash">git log --date=relative --author=nizam --since="2 weeks ago"</pre>
<p>Bam. Done.
</li>
<li>Easy repo creation. You don&#8217;t have to be an admin to setup a git repo. Just cd into a folder and type &#8220;git init&#8221;. You just created a new repo. I do this all the time, for example in my folder of todo lists, I use it to track history of my todos. At work someone kept messing up the apache config file, all I had to do was &#8220;git init&#8221; in /etc/httpd/conf and now I can easily &#8220;git diff&#8221; new changes that were made and revert / adjust if needed.</li>
<li>Many ways to use it. Git is promoted as &#8220;decentralized&#8221; version control, but it can be an easy drop in replacement for any job SVN can do. Which leads me to&#8230;
<li>
</ul>
<p>With all those advantages, many larger companies haven&#8217;t jumped on the git bandwagon. I believe there&#8217;s two reasons this is the case.</p>
<ul>
<li>As programmers get more experienced, they generally become more pragmatic (which is generally a good thing.) They adopt a &#8220;if it ain&#8217;t broke, don&#8217;t fix it.&#8221; mentality. After all, SVN get&#8217;s the job done.</li>
<li>There is a bit of a learning curve with git. But there are a ton of good resources for learning it. I recommend getting your hands dirty with <a href="http://gitimmersion.com/">Git Immersion</a> if you&#8217;re new or would like to learn. I don&#8217;t recommend wrapping git around svn as I&#8217;m about to show you for a person who&#8217;s learning git.</li>
</ul>
<h3>Getting down to business.</h3>
<p>In order to use git with an svn repo, you&#8217;ll have to run some commands to import that svn repo, commit by commit into a git repo.</p>
<p>1. First, make sure you have a version of git installed with svn bindings. If you type &#8220;git svn&#8221; and it give you an error, I&#8217;d google one of the resources in reinstalling git with svn bindings.</p>
<p>2. We need to keep</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># In your existing svn repo, lets grab a list of authors</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> log <span style="color: #660033;">-q</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> <span style="color: #ff0000;">'|'</span> <span style="color: #ff0000;">'/^r/ {sub(&quot;^ &quot;, &quot;&quot;, $2); sub(&quot; $&quot;, &quot;&quot;, $2); print $2&quot; = &quot;$2&quot; &lt;&quot;$2&quot;&gt;&quot;}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #660033;">-u</span> <span style="color: #000000; font-weight: bold;">&gt;</span> authors.txt
<span style="color: #666666; font-style: italic;"># create a new folder</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..; <span style="color: #c20cb9; font-weight: bold;">mkdir</span> NEWREPO.git;
git <span style="color: #c20cb9; font-weight: bold;">svn</span> clone <span style="color: #660033;">-A</span> ..<span style="color: #000000; font-weight: bold;">/</span>OLDREPO<span style="color: #000000; font-weight: bold;">/</span>authors.txt https:<span style="color: #000000; font-weight: bold;">//</span>svn<span style="color: #000000; font-weight: bold;">/</span>repo<span style="color: #000000; font-weight: bold;">/</span>trunk
git <span style="color: #c20cb9; font-weight: bold;">svn</span> fetch <span style="color: #666666; font-style: italic;"># this could take a long time as it checks the repo out one rev at a time.</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># update your working copy:</span>
git-svn rebase
&nbsp;
<span style="color: #666666; font-style: italic;"># commit your changes to svn server</span>
git-svn dcommit</pre></div></div>

<p>kudos to:</p>
<p>http://flavio.castelli.name/howto_use_git_with_svn</p>
]]></content:encoded>
			<wfw:commentRss>http://readystate4.com/2012/01/27/setting-up-and-using-a-git-wrapper-around-svn-with-git-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Event-driven programming vs traditional programming</title>
		<link>http://readystate4.com/2011/05/02/event-driven-programming-vs-traditional-programming/</link>
		<comments>http://readystate4.com/2011/05/02/event-driven-programming-vs-traditional-programming/#comments</comments>
		<pubDate>Mon, 02 May 2011 19:33:01 +0000</pubDate>
		<dc:creator>Mauvis</dc:creator>
				<category><![CDATA[node]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://readystate4.com/?p=325</guid>
		<description><![CDATA[Great post explaining the hype around Node and what exactly is event-driven programming and this business of non-blocking I/O. This kind of system has been around for years (see Python&#8217;s Twisted and Ruby&#8217;s Event Machine), but never has it been so easy to do with JavaScript&#8217;s easy syntax and support for first class functions. As [...]]]></description>
			<content:encoded><![CDATA[<p>Great <a href="http://code.danyork.com/2011/01/25/node-js-doctors-offices-and-fast-food-restaurants-understanding-event-driven-programming/">post</a> explaining the hype around Node and what exactly is event-driven programming and this business of non-blocking I/O. This kind of system has been around for years (see Python&#8217;s <a href="http://twistedmatrix.com/trac/">Twisted</a> and Ruby&#8217;s <a href="http://rubyeventmachine.com/">Event Machine</a>), but never has it been so easy to do with JavaScript&#8217;s easy syntax and support for <a href="http://en.wikipedia.org/wiki/First-class_function">first class functions</a>. As JS dev&#8217;s we&#8217;re already used to the whole asynchronous mindset of not-blocking the page from the user.</p>
]]></content:encoded>
			<wfw:commentRss>http://readystate4.com/2011/05/02/event-driven-programming-vs-traditional-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good series of writeups on Node.js from a developer who&#8217;s learning it.</title>
		<link>http://readystate4.com/2011/04/23/good-series-of-writeups-on-node-js-from-a-developer-whos-learning-it/</link>
		<comments>http://readystate4.com/2011/04/23/good-series-of-writeups-on-node-js-from-a-developer-whos-learning-it/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 15:17:37 +0000</pubDate>
		<dc:creator>Mauvis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[nodejs]]></category>

		<guid isPermaLink="false">http://readystate4.com/?p=309</guid>
		<description><![CDATA[I did a little experimenting with Node.js back when it initially hit mainstream. I thought it was pretty neat, but haven&#8217;t really touched it since considering I didn&#8217;t have any upcoming projects that would see major gains using it, didn&#8217;t have time for the learning curve, and, honesty, wasn&#8217;t sure if Node would stand the [...]]]></description>
			<content:encoded><![CDATA[<p>I did a little experimenting with <a href="http://nodejs.org/">Node.js</a> back when it initially hit mainstream.  I thought it was pretty neat, but haven&#8217;t really touched it since considering I didn&#8217;t have any upcoming projects that would see major gains using it, didn&#8217;t have time for the learning curve, and, honesty, wasn&#8217;t sure if Node would stand the test of time.</p>
<p>Fast forward a year later and Node and it&#8217;s community has grown a lot. Now that I&#8217;m messing around with <a href="https://github.com/mishoo/UglifyJS">UglifyJS</a>, it&#8217;s about time to get down to learning the roots—I know that even though UglifyJS is written in Node doesn&#8217;t necessarily mean that one needs to know it to use this utility, but I&#8217;m the kind of guy that needs to know everything (like what is Ugly&#8217;s relation to <a href="http://www.commonjs.org/">CommonJS</a>) and now&#8217;s the best time to continue my exploration than ever.</p>
<p>As a starter, Jan Van Ryswyck of elegantcode.com wrote a series of articles on his experience of learning Node, starting from the basics of why use it and what are it&#8217;s benefits. Though it&#8217;s geared towards Window&#8217;s users, it&#8217;s still a pretty good read. He goes into the details of the event-driven model of Node (familiar to just about every JS developer), compares it to the traditional thread model, discusses Node&#8217;s growing community and open-source plugins, how to debug a Node application, and so on. Here&#8217;s a link containing the various chapters: <a href="http://elegantcode.com/2011/04/20/taking-baby-steps-with-node-js-the-towering-inferno/">Taking Baby Steps with NodeJS the Towering Inferno</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://readystate4.com/2011/04/23/good-series-of-writeups-on-node-js-from-a-developer-whos-learning-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The iPhone&#8217;s one fatal flaw: undependable alarm bug</title>
		<link>http://readystate4.com/2011/02/17/the-iphones-one-fatal-flaw-undependable-alarm-bug/</link>
		<comments>http://readystate4.com/2011/02/17/the-iphones-one-fatal-flaw-undependable-alarm-bug/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 18:10:44 +0000</pubDate>
		<dc:creator>Mauvis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[annoying iphone bugs]]></category>

		<guid isPermaLink="false">http://readystate4.com/?p=205</guid>
		<description><![CDATA[I sit here, waiting for the 10:07am Caltrain cursing my iPhone for a bug I wish was more well published. It&#8217;s something that&#8217;s bit me a few times in the past with older iPhones and happens when an unconfirmed popup alert will prevent all alarms from going off &#8211; this can be a text message [...]]]></description>
			<content:encoded><![CDATA[<p>I sit here, waiting for the 10:07am Caltrain cursing my iPhone for a bug I wish was more well published. It&#8217;s something that&#8217;s bit me a few times in the past with older iPhones and happens when an unconfirmed popup alert will prevent all alarms from going off &#8211; this can be a text message alert, battery-low alert, etc. Today it was a Facebook comment alert that just so happen to popup before my morning alarm. Now I&#8217;m late for work. I only have myself to blame (I do set multiple alarm sources but one is the radio). Man is this annoying.</p>
]]></content:encoded>
			<wfw:commentRss>http://readystate4.com/2011/02/17/the-iphones-one-fatal-flaw-undependable-alarm-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pretty printing XML with xmllint</title>
		<link>http://readystate4.com/2010/12/10/pretty-printing-xml-with-xmllint/</link>
		<comments>http://readystate4.com/2010/12/10/pretty-printing-xml-with-xmllint/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 22:30:36 +0000</pubDate>
		<dc:creator>Mauvis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://readystate4.com/?p=90</guid>
		<description><![CDATA[Today I was debugging some long XML responses and I went online to find a pretty printer so that I could read them easier. A quick Google search turns up a decent XML beautifier: http://xmlbeautifier.com/default.aspx Unfortunately one XML response in particular was over 200kb which choked the above parser. I searched for 5-minutes and couldn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was debugging some long XML responses and I went online to find a pretty printer so that I could read them easier. A quick Google search turns up a decent XML beautifier: http://xmlbeautifier.com/default.aspx</p>
<p>Unfortunately one XML response in particular was over 200kb which choked the above parser. I searched for 5-minutes and couldn&#8217;t find another one that didn&#8217;t require downloading and setting up. My next bet was to ask the geniuses in the irc #emacs channel if this is something emacs might do and got a quick answer: Use <code>xmllint</code>.</p>
<p>I did a quick check if I have this program with <code>which xmllint</code> on both my OS X machine and my remote Centos server &#8211; sure enough it was there. Here&#8217;s how to use it:</p>
<p>Just dump your xml in a text file (xml.txt) and run the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xmllint <span style="color: #660033;">-format</span> xml.txt <span style="color: #660033;">--output</span> xml2.txt</pre></div></div>

<p>Additionally, if you&#8217;re a TextMate user you can just go to BUNDLE > XML > Tidy.</p>
]]></content:encoded>
			<wfw:commentRss>http://readystate4.com/2010/12/10/pretty-printing-xml-with-xmllint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TeamViewer constantly crashing?</title>
		<link>http://readystate4.com/2010/01/08/teamviewer-constantly-crashing/</link>
		<comments>http://readystate4.com/2010/01/08/teamviewer-constantly-crashing/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 20:09:47 +0000</pubDate>
		<dc:creator>Mauvis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://readystate4.com/?p=64</guid>
		<description><![CDATA[If you suddendly find your TeamViewer crashing every time you open it simply delete it&#8217;s plist file and you&#8217;re good to go: /Users/&#60;YourName&#62;/Library/Preferences/com.TeamViewer.settings.plist Thanks to Christian Hägele (of TeamViewer) for the fix.]]></description>
			<content:encoded><![CDATA[<p>If you suddendly find your TeamViewer crashing every time you open it simply delete it&#8217;s plist file and you&#8217;re good to go: </p>
<pre>/Users/&lt;YourName&gt;/Library/Preferences/com.TeamViewer.settings.plist</pre>
<p>Thanks to Christian Hägele (of TeamViewer) for the fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://readystate4.com/2010/01/08/teamviewer-constantly-crashing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

