<?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>Veeb&#039;s Brain Dump</title>
	<atom:link href="http://www.veebsbraindump.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.veebsbraindump.com</link>
	<description></description>
	<lastBuildDate>Thu, 19 Jan 2012 21:26:24 +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>My Git Hub Shortcuts</title>
		<link>http://www.veebsbraindump.com/2011/11/my-git-hub-shortcuts/</link>
		<comments>http://www.veebsbraindump.com/2011/11/my-git-hub-shortcuts/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 04:14:41 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=458</guid>
		<description><![CDATA[Fork http://help.github.com/fork-a-repo/ &#160; Committing Changes &#160; Update a Forked Repository &#160; Creating a Branch &#160; Getting a Remote Branch http://stackoverflow.com/questions/1897475/github-how-to-checkout-production-branch Tagging Merge Patch Request Locally to Test it Out &#160; Tweet]]></description>
			<content:encoded><![CDATA[<h2>Fork</h2>
<p><a href="http://help.github.com/fork-a-repo/">http://help.github.com/fork-a-repo/</a></p>
<pre class="brush: bash; title: ; notranslate">
git clone git@github.com:username/Spoon-Knife.git

cd Spoon-Knife
git remote add upstream git://github.com/octocat/Spoon-Knife.git
git fetch upstream
</pre>
<p>&nbsp;</p>
<h2>Committing Changes</h2>
<pre class="brush: bash; title: ; notranslate">
# To commit changes to local repository
git commit -a

# Send changes to remote repository:
git push origin master
</pre>
<p>&nbsp;</p>
<h2>Update a Forked Repository</h2>
<pre class="brush: bash; title: ; notranslate">
#Fetches any new changes from the original repo
git fetch upstream

# Merge changes retrieved from the fetch
git merge upstream/master
</pre>
<p>&nbsp;</p>
<h2>Creating a Branch</h2>
<pre class="brush: bash; title: ; notranslate">
# Creates a new branch called &quot;mybranch&quot;
git branch mybranch

# Switch to mybranch
git checkout mybranch

# Merge changes from mybranch into master and delete mybranch
git checkout master
git merge mybranch
git branch -d mybranch

# Delete remote branch after local delete
git push origin :mybranch
</pre>
<p>&nbsp;</p>
<h2>Getting a Remote Branch</h2>
<p><a href="http://stackoverflow.com/questions/1897475/github-how-to-checkout-production-branch">http://stackoverflow.com/questions/1897475/github-how-to-checkout-production-branch</a></p>
<pre class="brush: bash; title: ; notranslate">
# To list branches:
git branch -a

#You could checkout directly the remote branch after fetching it
git fetch origin
git branch -f remote_branch_name origin/remote_branch_name
git checkout remote_branch name

# or shorter:
git checkout -b production origin/production

# Merge changes from remote production into local production
git co -b production
git pull origin production
</pre>
<h2>Tagging</h2>
<pre class="brush: bash; title: ; notranslate">
#Create local tag
git tag -m&quot;Tag version 1.0&quot; V1.0 

# Push tag to origin
git push --tags
</pre>
<h2>Merge Patch Request Locally to Test it Out</h2>
<pre class="brush: bash; title: ; notranslate">
# Every pull request has a .patch URL where you can grab a textual patch file to feed into the git-am command
$ git checkout master
$ curl http://github.com/github/jobs/pull/25.patch | git am
$ git push origin master
</pre>
<p>&nbsp;</p>
<div id="tweetbutton458" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D458&amp;text=My%20Git%20Hub%20Shortcuts&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F11%2Fmy-git-hub-shortcuts%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/11/my-git-hub-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote javascript logging</title>
		<link>http://www.veebsbraindump.com/2011/10/remote-javascript-logging/</link>
		<comments>http://www.veebsbraindump.com/2011/10/remote-javascript-logging/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 22:27:39 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=444</guid>
		<description><![CDATA[Well, finally shipped a version of Chililog with decent websocket support. Can now stream console.log from user&#8217;s browser to my desktop browser. Checkout the video and live demo at http://blog.chililog.org/2011/10/24/remote-javascript-logging/. Tweet]]></description>
			<content:encoded><![CDATA[<p>Well, finally shipped a version of Chililog with decent websocket support. Can now stream console.log from user&#8217;s browser to my desktop browser.</p>
<p>Checkout the video and live demo at http://blog.chililog.org/2011/10/24/remote-javascript-logging/.</p>
<div id="tweetbutton444" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D444&amp;text=Remote%20javascript%20logging&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F10%2Fremote-javascript-logging%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/10/remote-javascript-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chililog</title>
		<link>http://www.veebsbraindump.com/2011/10/chililog/</link>
		<comments>http://www.veebsbraindump.com/2011/10/chililog/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 11:12:50 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=437</guid>
		<description><![CDATA[I&#8217;ve been working on a new open source project called Chililog. I&#8217;ll be blogging about how I&#8217;ve used Netty, HornetQ, MongoDB and Sproutcore to build Chililog here. Tweet]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a new open source project called Chililog.</p>
<p>I&#8217;ll be blogging about how I&#8217;ve used Netty, HornetQ, MongoDB and Sproutcore to build Chililog <a title="Chililog Blog" href="http://blog.chililog.org" target="_blank">here</a>.</p>
<div id="tweetbutton437" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D437&amp;text=Chililog&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F10%2Fchililog%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/10/chililog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebSockets and Netty</title>
		<link>http://www.veebsbraindump.com/2011/10/websockets-and-netty/</link>
		<comments>http://www.veebsbraindump.com/2011/10/websockets-and-netty/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 05:35:35 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Netty]]></category>
		<category><![CDATA[WebSockets]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=419</guid>
		<description><![CDATA[What are WebSockets? Current web browser communications protocol is limited to the HTTP request and response paradigm &#8211; i.e. the browser requests and the server responds. What if we want to use a different communications paradigm?  For example, what if we want to perform 2 way communications where the server sends a request and the [...]]]></description>
			<content:encoded><![CDATA[<h2>What are WebSockets?</h2>
<p>Current web browser communications protocol is limited to the HTTP request and response paradigm &#8211; i.e. the browser requests and the server responds.</p>
<p>What if we want to use a different communications paradigm?  For example, what if we want to perform 2 way communications where the server sends a request and the browser responds?  A common use case would be the server notifies the client that an event has occurred.</p>
<p>This is where <a href="http://en.wikipedia.org/wiki/WebSocket">WebSockets</a> come into play. WebSocket is a technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket.</p>
<p>In addition, because WebSockets can co-exist with other HTTP traffic over port 80 and 443, firewalls will not have to be re-configured.</p>
<h2>Version Confusion</h2>
<p>WebSockets is an evolving standard.  Just have a look at the different <a href="http://en.wikipedia.org/wiki/Comparison_of_WebSocket_implementations">implementations</a> and the different versions each support.</p>
<p>There have been numerous version of the WebSocket standards under different names.  So far, browser have converged on 2 versions.</p>
<ul>
<li><a href="http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76">Hixie-76</a>/<a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00">HyBi-00</a></li>
<ul>
<li>Safari 5+, Chrome 4-13 and Firefox 4 supports this standard.</li>
<li>There are two names for this version because the Hixie-76 documentation is used as input into the new HiBi IETF working group.</li>
<li>A flaw in this standard was discovered in the handshaking which requires exchange of binary data in the HTTP body.  This did not work across some proxy servers.</li>
</ul>
<li><a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10">HyBi-10</a></li>
<ul>
<li>Chrome  14, Firefox 7 and IE 10 Developer Preview supports this standard.</li>
<li>Handshaking is performed in HTTP request and response headers</li>
<li>Uses wire protocol version 8.  You will see &#8220;Sec-WebSocket-Version: 8&#8243; in the HTTP header.</li>
</ul>
</ul>
<p>Hybi-00 and Hybi-10 both represents versions of the specification document.  The version of the wire protocol are actually 0 and 8 respectively.</p>
<p>Typically, the wire protocol (sequence of bits and bytes sent over the network) does not change between different versions of the specification document.  As such, the wire protocol version is set by the version of the specification document at which the change was made to the wire protocol.  So version 8 of the wire protocol was made in <a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-08">Hybi-08</a>.</p>
<p>What changes are made between different versions of the specification document? Corrections of typos, clarification of concepts and adjustments in handshaking.</p>
<p>The latest version is <a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17">Hybi-17</a> (with a wire protocol version of 13).  So far, no browsers have supported that version.</p>
<h2>Netty WebSocket Support</h2>
<p>I&#8217;m using <a href="http://www.jboss.org/netty/downloads">Netty </a>3.2.5 in building <a href="https://github.com/chililog">Chililog</a> (topic for another blog post).</p>
<p>Netty 3.2.5 supports Hixie-75 and 76 but <strong>NOT</strong> Hybi-10.</p>
<p>I&#8217;ve compiled together my own WebSocket package for Chililog to support both &#8220;Hixie-75/76/Hybi-00&#8243; and &#8220;Hybi-10&#8243;.  This allows my Chililog server to support all of today&#8217;s major browsers (except for IE which does not support Web Sockets at all).</p>
<p>I&#8217;ve used the word &#8220;compiled&#8221; because I&#8217;ve extensively used code from Netty and <a href="https://github.com/joewalnes/webbit">Webbit</a> (for which Aslak Hellesøy has written hybi-10 support).  I&#8217;ve also used code from <a href="https://github.com/cgbystrom/netty-tools">cgbystrom </a>to help build web socket clients.</p>
<p>I&#8217;ve submitted the work back to Netty as <a href="https://github.com/netty/netty/pull/26">pull request #26</a>.</p>
<p>Points of interest:</p>
<ol>
<li>I&#8217;ve not changed the existing <em>org.jboss.netty.handler.codec.http.websocket</em> package.  I&#8217;ve found quite a few frameworks using this package.  I think it would be best if the next version of Netty can be a &#8220;drop-in&#8221; replacement.</li>
<li>I&#8217;ve put all my changes in <em>org.jboss.netty.handler.codec.http.websocket<strong>x</strong></em>.  The &#8220;x&#8221; is intended to represent multiple versions.</li>
<li>The <em>websocketx</em> package supports both WebSocket versions (&#8220;Hixie-75/76/Hybi-00&#8243; and &#8220;Hybi-10&#8243;)  for both client and server.</li>
<li>Frames</li>
<ul>
<li>Data is sent between client and server in frames.</li>
<li>The old <em>websocket</em> package implements only the <em>DefaultWebSocketFrame</em>.  Text, binary and closing frames are encapsulated into this single class.</li>
<li>The new <em>websocketx</em> package implements frames as a different class: <em>TextWebSocketFrame</em>, <em>BinaryWebSocketFrame</em>, <em>CloseWebSocketFrame</em>, <em>PingWebSocketFrame</em> and <em>PongWebSocketFrame</em>.  I felt that this made the code easier to read and understand.</li>
</ul>
<li>Encoders and Decoders</li>
<ol>
<li>Hixie-75/76/Hybi-00 is implemented as <em>WebSocket00FrameDecoder</em> and <em>WebSocket00FrameEncoder</em>.</li>
<li>Hybi-10 is implemented as <em>WebSocket08FrameDecoder</em> and <em>WebSocket08FrameEncoder</em>.  The version #8 is used because the wire protocol #8 is used in conjunction  with the specification document version #10.</li>
</ol>
<li>Server Handshake</li>
<ul>
<li>Implements the handshaking protocol on the server side.</li>
<li>Hixie-75/76/Hybi-00 is implemented in <em>WebSocketServerHandshaker00  </em></li>
<li>Hybi-10 is implemented in <em>WebSocketServerHandshaker10  </em></li>
<li><em>WebSocketServerHandshakerFactory</em> picks the correct handshaker to use based on the handshaking request sent by the client.</li>
<li>See <em>org.jboss.netty.example.http.websocketx.server.WebSocketServer</em>  for an example.</li>
</ul>
<li>Client Handshake</li>
<ul>
<li>Implements the handshaking protocol on the client side.</li>
<li>Hixie-75/76/Hybi-00 is implemented in <em>WebSocketClientHandshaker00</em></li>
<li><em>Hybi-10 is implemented in <em>WebSocketClientHandshaker10  </em><br />
</em></li>
<li><em><em><em>WebSocketClientHandshakerFactory</em></em></em> picks the correct handshaker to use based on the version of the specification passed in as a paramter<em><em>.<br />
</em></em></li>
<li><em><em>See <em>org.jboss.netty.example.http.websocketx.client.App</em></em></em>  for an example<em><em>.</em></em></li>
</ul>
</ol>
<p>Hope this helps anyone looking for Hybi-10 support in Netty.</p>
<h2>27 Oct 2011 &#8211; Update</h2>
<p>Pull #26 request has been merged into Netty.  This feature should be in upcoming Netty release 3.3.</p>
<h2>20 Jan 2012 &#8211; Update</h2>
<p>This has now been released in Netty 3.3.  See <a href="http://netty.io/blog/2012/01/19/">blog post</a>.</p>
<p style="padding-bottom: 4px;">
<div id="tweetbutton419" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D419&amp;text=WebSockets%20and%20Netty&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F10%2Fwebsockets-and-netty%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/10/websockets-and-netty/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Strobe and BPM error on ubuntu: stack level too deep (SystemStackError)</title>
		<link>http://www.veebsbraindump.com/2011/09/strobe-and-bpm-error-on-ubuntu-stack-level-too-deep-systemstackerror/</link>
		<comments>http://www.veebsbraindump.com/2011/09/strobe-and-bpm-error-on-ubuntu-stack-level-too-deep-systemstackerror/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 08:47:48 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=415</guid>
		<description><![CDATA[The cause is a missing gem.  https://github.com/bpm/bpm/issues/33 From the ubuntu software centre, install libyaml-dev sudo gem install psych sudo gem install strobe Tweet]]></description>
			<content:encoded><![CDATA[<div>The cause is a missing gem.  https://github.com/bpm/bpm/issues/33</div>
<div>
<ol>
<li>From the ubuntu software centre, install <tt>libyaml-dev</tt></li>
<li><tt>sudo gem install psych</tt></li>
<li><tt>sudo gem install strobe</tt></li>
</ol>
</div>
<div id="tweetbutton415" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D415&amp;text=Strobe%20and%20BPM%20error%20on%20ubuntu%3A%20stack%20level%20too%20deep%20%28SystemStackError%29&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F09%2Fstrobe-and-bpm-error-on-ubuntu-stack-level-too-deep-systemstackerror%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/09/strobe-and-bpm-error-on-ubuntu-stack-level-too-deep-systemstackerror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TortoiseGIT not refreshing in Windows Explorer after commit?</title>
		<link>http://www.veebsbraindump.com/2011/08/tortoisegit-not-refreshing-in-windows-explorer-after-commit/</link>
		<comments>http://www.veebsbraindump.com/2011/08/tortoisegit-not-refreshing-in-windows-explorer-after-commit/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 07:50:04 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=411</guid>
		<description><![CDATA[Kill the process TGitCache.exe. Tweet]]></description>
			<content:encoded><![CDATA[<p>Kill the process TGitCache.exe.</p>
<div id="tweetbutton411" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D411&amp;text=TortoiseGIT%20not%20refreshing%20in%20Windows%20Explorer%20after%20commit%3F&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F08%2Ftortoisegit-not-refreshing-in-windows-explorer-after-commit%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/08/tortoisegit-not-refreshing-in-windows-explorer-after-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Commons 1053 Error on stopping?</title>
		<link>http://www.veebsbraindump.com/2011/08/apache-commons-1053-error-on-stopping/</link>
		<comments>http://www.veebsbraindump.com/2011/08/apache-commons-1053-error-on-stopping/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 07:17:59 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=408</guid>
		<description><![CDATA[Followed this tutorial to turn my Java app into a windows server. http://blog.platinumsolutions.com/node/234 Then I got the dreaded Error 1053 on stopping. It was happening to me on Windows 2008 Server 64 bit R2. Found that if I put a timeout on the stop, i did not get the error. set PR_STOPTIMEOUT=5 Tweet]]></description>
			<content:encoded><![CDATA[<p>Followed this tutorial to turn my Java app into a windows server.</p>
<p>http://blog.platinumsolutions.com/node/234</p>
<p>Then I got the dreaded Error 1053 on stopping.</p>
<p>It was happening to me on Windows 2008 Server 64 bit R2.</p>
<p>Found that if I put a timeout on the stop, i did not get the error.</p>
<p>set PR_STOPTIMEOUT=5</p>
<div id="tweetbutton408" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D408&amp;text=Apache%20Commons%201053%20Error%20on%20stopping%3F&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F08%2Fapache-commons-1053-error-on-stopping%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/08/apache-commons-1053-error-on-stopping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable Backspace key in browser except in text boxes</title>
		<link>http://www.veebsbraindump.com/2011/07/disable-backspace-key-in-browser-except-in-text-boxes/</link>
		<comments>http://www.veebsbraindump.com/2011/07/disable-backspace-key-in-browser-except-in-text-boxes/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 00:49:11 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=404</guid>
		<description><![CDATA[I found the following code here. Tweet]]></description>
			<content:encoded><![CDATA[<p>I found the following code <a href="http://mspeight.blogspot.com/2007/05/how-to-disable-backspace-in-ie-and.html">here</a>.</p>
<pre class="brush: jscript; title: ; notranslate">

// Trap Esc(27), Backspace(8) and Enter(13) -
// Except bksp on text/textareas/password, enter on textarea/submit/link
if (typeof window.event != 'undefined') {
  document.onkeydown = function() {
    var t = event.srcElement.type;
    var kc = event.keyCode;
    //alert('Type: ' + t);
    // Type = '' is what I get from the A HREF elements that need to remain functional in my form
    return ((kc != 8 &amp;&amp; kc != 13 &amp;&amp; kc != 27) || (t == 'text' &amp;&amp; kc != 13 &amp;&amp; kc != 27) ||
            (t == 'textarea' &amp;&amp; kc != 27) || (t == 'button' &amp;&amp; kc == 13) || (t == 'submit' &amp;&amp; kc == 13) ||
            (t == 'password' &amp;&amp; kc != 27 &amp;&amp; kc != 13) || (t == '' &amp;&amp; kc == 13));
    }
} else {
  document.onkeypress = function(e) {
    // FireFox/Others
    var t = e.target.type;
    var kc = e.keyCode;
    if ((kc != 8 &amp;&amp; kc != 13 &amp;&amp; kc != 27) || (t == 'text' &amp;&amp; kc != 13 &amp;&amp; kc != 27) ||
       (t == 'textarea' &amp;&amp; kc != 27) || (t == 'button' &amp;&amp; kc == 13) || (t == 'submit' &amp;&amp; kc == 13) ||
       (t == 'password' &amp;&amp; kc != 27 &amp;&amp; kc != 13) || (t == '' &amp;&amp; kc == 13)) {
        return true;
    } else {
        return false;
    }
  }
}
</pre>
<div id="tweetbutton404" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D404&amp;text=Disable%20Backspace%20key%20in%20browser%20except%20in%20text%20boxes&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F07%2Fdisable-backspace-key-in-browser-except-in-text-boxes%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/07/disable-backspace-key-in-browser-except-in-text-boxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding row number to SC.TableView</title>
		<link>http://www.veebsbraindump.com/2011/05/adding-row-number-to-sc-tableview/</link>
		<comments>http://www.veebsbraindump.com/2011/05/adding-row-number-to-sc-tableview/#comments</comments>
		<pubDate>Thu, 19 May 2011 06:29:10 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Sproutcore]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=399</guid>
		<description><![CDATA[I&#8217;m using the new SC.TableView from github.com/endash/endash Add the following column. Note that the key is set to a dummy property in your model that does not exist. In the formatter method, I get the row index, add 1 and display it. Tweet]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using the new SC.TableView from github.com/endash/endash</p>
<p>Add the following column.</p>
<pre class="brush: jscript; title: ; notranslate">
      SC.TableColumn.create({
        key:   'dummy',
        title: 'Row',
        width: 50,
        isReorderable: NO,
        formatter: function(v, target) {
          return target.get('contentIndex') + 1;
        },
        exampleView: SC.TableCellContentView.extend({
          textAlign: SC.ALIGN_RIGHT,
          fontWeight: SC.BOLD_WEIGHT
        })
      })
</pre>
<p>Note that the key is set to a dummy property in your model that does not exist.</p>
<p>In the formatter method, I get the row index, add 1 and display it.</p>
<div id="tweetbutton399" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D399&amp;text=Adding%20row%20number%20to%20SC.TableView&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F05%2Fadding-row-number-to-sc-tableview%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/05/adding-row-number-to-sc-tableview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sproutcore Buildfiles</title>
		<link>http://www.veebsbraindump.com/2011/04/sproutcore-buildfiles/</link>
		<comments>http://www.veebsbraindump.com/2011/04/sproutcore-buildfiles/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 06:38:36 +0000</pubDate>
		<dc:creator>Veebs</dc:creator>
				<category><![CDATA[Sproutcore]]></category>

		<guid isPermaLink="false">http://www.veebsbraindump.com/?p=394</guid>
		<description><![CDATA[Here&#8217;s some notes on buildfiles: 1. Buildfile in apps/my_app directory override Buildfile in the project directory 2. Specify required framework in apps/my_app directory Buildfile 3. Put URL proxy in project directory Buildfile 4. Default Buildfile settings is found here. Tweet]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some notes on buildfiles:</p>
<p>1. Buildfile in apps/my_app directory override Buildfile in the project directory</p>
<p>2. Specify required framework in apps/my_app directory Buildfile</p>
<pre class="brush: ruby; title: ; notranslate">
config :my_app,
         :css_theme =&gt; 'ace.my_app',
         :required =&gt; [:sproutcore, 'sproutcore/statechart', 'endash/table']
</pre>
<p>3. Put URL proxy in project directory Buildfile</p>
<pre class="brush: ruby; title: ; notranslate">
config :all, :required =&gt; [:sproutcore]

## Proxies
proxy &quot;/api&quot;, :to =&gt; &quot;localhost:8989&quot;
</pre>
<p>4. Default Buildfile settings is found <a href="https://github.com/sproutcore/abbot/blob/master/lib/Buildfile">here</a>.</p>
<div id="tweetbutton394" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fveebsbraindump.com%2F%3Fp%3D394&amp;text=Sproutcore%20Buildfiles&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.veebsbraindump.com%2F2011%2F04%2Fsproutcore-buildfiles%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.veebsbraindump.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.veebsbraindump.com/2011/04/sproutcore-buildfiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

