<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5119507428537231083</id><updated>2024-10-24T18:16:47.943-07:00</updated><category term="Powershell"/><category term="javascript"/><category term="node.js"/><category term="shell"/><category term="commonjs"/><category term="development"/><category term="git"/><category term="json"/><category term="nodemon"/><category term="source control"/><category term="xml"/><title type='text'>Brain.toString()</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://braintostring.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5119507428537231083.post-8580835247875545597</id><published>2014-01-16T04:52:00.000-08:00</published><updated>2014-01-16T04:52:34.861-08:00</updated><title type='text'>Using Git on Windows</title><content type='html'>I&#39;ve been using Git for about two years now and I&#39;ve never looked back.&lt;br /&gt;
&lt;br /&gt;
Being a Windows monkey though I&#39;m still not ninja enough to use bash all the time so my command line setup is Powershell with posh-git, and I&#39;m pretty happy with the setup.&lt;br /&gt;
&lt;br /&gt;
Phil Haack&#39;s article on installing these tools is perfect.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://haacked.com/archive/2011/12/19/get-git-for-windows.aspx/&quot;&gt;http://haacked.com/archive/2011/12/19/get-git-for-windows.aspx/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://braintostring.blogspot.com/feeds/8580835247875545597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://braintostring.blogspot.com/2014/01/using-git-on-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/8580835247875545597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/8580835247875545597'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/2014/01/using-git-on-windows.html' title='Using Git on Windows'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5119507428537231083.post-268550464638610672</id><published>2013-07-16T09:32:00.001-07:00</published><updated>2013-07-16T09:32:49.081-07:00</updated><title type='text'>Introduction to agile software development</title><content type='html'>&amp;nbsp;&amp;nbsp;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/qePsosYv7z0&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;A gentle introduction into some of the ideas behind agile development.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.slideshare.net/cajones2013/introduction-to-agile-24302528&quot; target=&quot;_blank&quot;&gt;Slide Share&lt;/a&gt;&amp;nbsp;is available.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://braintostring.blogspot.com/feeds/268550464638610672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://braintostring.blogspot.com/2013/07/introduction-to-agile-software.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/268550464638610672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/268550464638610672'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/2013/07/introduction-to-agile-software.html' title='Introduction to agile software development'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5119507428537231083.post-6418203357627380329</id><published>2012-04-24T08:18:00.000-07:00</published><updated>2012-04-25T09:30:10.790-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="development"/><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><title type='text'>Powershell cmdlets that changed my life...</title><content type='html'>Ok, so maybe it didn&#39;t change my life but after discovering the &lt;code&gt;clip&lt;/code&gt; command, I&#39;ve serious improved my workflow.

&lt;br /&gt;
&lt;br /&gt;
Sometime you have to come out of the shell to do some things, like send emails and write documents and other boring stuff like that. &lt;code&gt;clip&lt;/code&gt; allows you to take some of your Powershell loveliness with you in your clipboard.&lt;br /&gt;
&lt;br /&gt;
For example, I needed to email a SQL script to a colleague, so in the Powershell prompt I found the file, grabbed the content and piped it to my clipboard.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;CommandLine : ls -r -i lescript.sql | gc | clip&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
One control Ctrl+V later and the script on its way.&lt;br /&gt;
Later I needed add a SVN repository URL to our Team Wiki....&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;CommandLine : (svn info)[2] | clip&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Later I was writing my blog post and I needed to get the last command from my history...&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;CommandLine : h -count 1 | fl commandline | clip&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
You get the idea :)</content><link rel='replies' type='application/atom+xml' href='http://braintostring.blogspot.com/feeds/6418203357627380329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://braintostring.blogspot.com/2012/04/powershell-cmdlets-that-changed-my-life.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/6418203357627380329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/6418203357627380329'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/2012/04/powershell-cmdlets-that-changed-my-life.html' title='Powershell cmdlets that changed my life...'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5119507428537231083.post-8045057979037504494</id><published>2012-02-03T02:12:00.000-08:00</published><updated>2012-04-25T09:30:40.177-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><category scheme="http://www.blogger.com/atom/ns#" term="source control"/><title type='text'>Simplify development with Powershell (part 2) - init local github repo</title><content type='html'>Just a quick script that I&#39;ve just added to my profile to initialise a github local repository.&lt;br /&gt;
&lt;br /&gt;
You do need to create the repo in github first. I need to look at the Github API to how to do this automatically... I&#39;ll edit this post with an update when I&#39;ve figured it out.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://gist.github.com/1729479&quot; target=&quot;_blank&quot;&gt;Gist&lt;/a&gt;&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/1729479.js?file=Git-Init.ps1&quot;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://braintostring.blogspot.com/feeds/8045057979037504494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://braintostring.blogspot.com/2012/02/simplify-development-with-powershell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/8045057979037504494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/8045057979037504494'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/2012/02/simplify-development-with-powershell.html' title='Simplify development with Powershell (part 2) - init local github repo'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5119507428537231083.post-2493768736282500255</id><published>2012-01-30T01:03:00.000-08:00</published><updated>2012-04-25T09:30:56.125-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><title type='text'>Simplify development with Powershell</title><content type='html'>I&#39;ve been using Powershell a lot recently, for Node development and I&#39;m just starting to get to grips with what it is possible to do with it.&lt;br /&gt;
&lt;br /&gt;
I also use &lt;a href=&quot;http://www.sublimetext.com/2&quot; target=&quot;_blank&quot;&gt;SublimeText 2&lt;/a&gt;&amp;nbsp;as my editor of choice, so I thought it would be cool (and time saving) if I could add a cmdlet to open a file directly from the shell, rather than having to switch windows and CTRL+O and navigate to the&amp;nbsp;file.&lt;br /&gt;
&lt;br /&gt;
I ended up using this custom cmdlet (&lt;a href=&quot;https://gist.github.com/1689496&quot; target=&quot;_blank&quot;&gt;Gist&lt;/a&gt;):&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/1689496.js?file=Edit-UsingSublimeText2.ps1&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
In case you&#39;re new to Powershell, I define a function called &lt;b&gt;Edit-UsingSublimeText2&lt;/b&gt; that takes a single parameter &lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$path&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; . Then I define a variable for the path to my editor executable. Next I&#39;m&amp;nbsp;&lt;/span&gt;appending both the argument and&amp;nbsp;&lt;span style=&quot;font-family: inherit;&quot;&gt;any &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ee176927.aspx&quot; target=&quot;_blank&quot;&gt;piped input&lt;/a&gt;&amp;nbsp;(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$input)&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;to an array called&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$files&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This means that&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$files&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; can either be specified by calling the function directly&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Edit-UsingSublimeText2 .\example.js&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;or by calling it as part of a pipeline&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;New-Item example.js -type file |&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Edit-UsingSublimeText2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Finally the last line calls a function (Execute-Each) which iterates over the a list&amp;nbsp;and calls the editor with contents of the control variable.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Note:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;|% &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;operator is short for Foreach-Object. It accepts a lambda/code block.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The &amp;amp; operator calls the argument.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The advantage of iterating over &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$files&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;is that the function can accept a list of files and each file is then opened by the editor. For example you can use the Get-ChildItems cmdlet to return a list of files:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;Get-ChildItems *.js |&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Edit-UsingSublimeText2&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Once you have written your new time saving function you can add it into your Powershell profile:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;Edit-UsingSublimeText2 $profile&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Copy the function into your profile and save it, and it will be loaded every time you open Powershell.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://braintostring.blogspot.com/feeds/2493768736282500255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://braintostring.blogspot.com/2012/01/simplify-development-with-powershell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/2493768736282500255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/2493768736282500255'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/2012/01/simplify-development-with-powershell.html' title='Simplify development with Powershell'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5119507428537231083.post-5149679180073734021</id><published>2012-01-20T06:46:00.000-08:00</published><updated>2012-01-22T02:14:56.750-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commonjs"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="json"/><category scheme="http://www.blogger.com/atom/ns#" term="node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>Writing Javascript Modules for Browser and Node</title><content type='html'>The &lt;a href=&quot;http://www.commonjs.org/&quot; target=&quot;_blank&quot;&gt;CommonJS&lt;/a&gt; initiative, defines a standard method for Javascript environments such as NodeJS to load reusable modules.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve modified my JSONX library to support Node&#39;s method of loading. This was simply a case of either loading the JSONX object into Node&#39;s pseudo-global &lt;b&gt;exports &lt;/b&gt;object or the current this context (which for a browser would be the &lt;b&gt;window&lt;/b&gt; object)&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;var root = this;

if (typeof exports === &#39;undefined&#39;) {
    root.JSONX = root.JSONX || {};
}

(function(jsonx){
    var stringify = function(obj, rootName) {
         /* implementation here */
    };
    jsonx.stringify = stringify;
})(root.JSONX || exports);
&lt;/pre&gt;
&lt;br /&gt;
Now the library can be loaded with a node &lt;i&gt;require &lt;/i&gt;function server-side or in the browser.&lt;br /&gt;
&lt;br /&gt;
Edit: The complete source for this code is on &lt;a href=&quot;https://bitbucket.org/chrisjones0099/jsonx/&quot;&gt;https://bitbucket.org/chrisjones0099/jsonx/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://braintostring.blogspot.com/feeds/5149679180073734021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://braintostring.blogspot.com/2012/01/writing-javascript-modules-for-browser.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/5149679180073734021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/5149679180073734021'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/2012/01/writing-javascript-modules-for-browser.html' title='Writing Javascript Modules for Browser and Node'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5119507428537231083.post-7765237691562949815</id><published>2012-01-19T07:40:00.000-08:00</published><updated>2012-01-22T02:10:00.107-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="nodemon"/><title type='text'>Quick start to getting a NodeJS development environment</title><content type='html'>I&#39;m developing on Windows, so if you are on Mac or Linux then the instruction may vary.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Download NodeJS&lt;/span&gt;&lt;br /&gt;
Visit&amp;nbsp;&lt;a href=&quot;http://www.nodejs.org/&quot; target=&quot;_blank&quot;&gt;nodejs.org&lt;/a&gt;&amp;nbsp;and download the latest installer. Install it.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Start installing packages&lt;/span&gt;&lt;br /&gt;
NodeJS comes with its own package manager, npm.&lt;br /&gt;
Open a command window (cmd.exe or powershell) and run:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;npm install nodemon -g&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
This will install &lt;a href=&quot;https://github.com/remy/nodemon&quot;&gt;nodemon&lt;/a&gt;, which will monitor for file changes and restart your app.
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Write some code&lt;/span&gt;&lt;br /&gt;
Write some code (I&#39;d recommend &lt;a href=&quot;http://www.sublimetext.com/2&quot; target=&quot;_blank&quot;&gt;Sublime Text 2&lt;/a&gt;&amp;nbsp;as your editor) then you can run you app with
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;nodemon [you node app]&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://braintostring.blogspot.com/feeds/7765237691562949815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://braintostring.blogspot.com/2012/01/quick-start-to-getting-nodejs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/7765237691562949815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/7765237691562949815'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/2012/01/quick-start-to-getting-nodejs.html' title='Quick start to getting a NodeJS development environment'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5119507428537231083.post-6341289081794258232</id><published>2012-01-16T02:04:00.000-08:00</published><updated>2012-01-22T02:09:32.450-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="node.js"/><title type='text'>Why Node JS</title><content type='html'>&lt;h1&gt;
What is NodeJS?&lt;/h1&gt;
&lt;br /&gt;
NodeJS is a lightweight platform for creating high-performance HTTP and TCP servers.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
So it&#39;s like Ruby on Rails?&lt;/h2&gt;
&lt;br /&gt;
Think of it more like a barebones toolkit for writing web applications. Its not opinionated either, so you don&#39;t have to do things like ActiveRecord or even MVC if you don&#39;t want to. &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
And it&#39;s Javascript right? Isn&#39;t that for browsers?&lt;/h2&gt;
&lt;br /&gt;
Ok, so Node is written in C++ by a group of nerds who are a bit obsessive about performance and speed. The core of it runs in Google&#39;s V8 runtime which incase you didn&#39;t know is the stupidly quick Javascript execution engine, used in Chrome (its also available as &lt;a href=&quot;http://code.google.com/p/v8&quot;&gt;standalone&lt;/a&gt; too). This means that server-side Javascript is here to stay and will continue to improve as V8 evolves. &lt;br /&gt;
Javascript also lends itself to asynchronous code so by using anonymous functions and fuctions as first class objects you can quickly put together a non-blocking application.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;



Some guy told me that Javascript is broken and evil...&lt;/h2&gt;
&lt;br /&gt;
Node is also the home of CoffeeScript, a ruby like language that compiles to Javascript. Feel free to use that instead if you want.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;



So how do I create an HTTP server?&lt;/h2&gt;
&lt;br /&gt;
Take a look at this &#39;Hello World&#39; example...&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var http = require(&#39;http&#39;);
http.createServer(function (req, res) {
    res.writeHead(200, {&#39;Content-Type&#39;: &#39;text/plain&#39;});
    res.end(&#39;Hello World&lt;/code&gt;&#39;);
}).listen(1337, &quot;127.0.0.1&quot;);&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
If you run this under Node it will create a HTTP server on port 1337 and respond with &#39;Hello World&#39;.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;



So I have to build everything from scratch?&lt;/h2&gt;
&lt;br /&gt;
No, not at all. Node comes with its own package manager, npm. It allows you to install a whole host of modules web frameworks and databases. For example, the module &lt;a href=&quot;http://expressjs.com/&quot;&gt;express&lt;/a&gt; gives you a complete web framework inspired by Sinatra, RailwayJS gives you an mvc framework similar to Ruby on Rails. &lt;br /&gt;
&lt;br /&gt;
For data access there are modules for MongoDB, CouchDB, MSSQL Server, PostgresSQL, Redis and more.&lt;br /&gt;
&lt;br /&gt;
View Engines include Jade, HAML, JQuery Tmpl, Mustache, PURE and others.&lt;br /&gt;
&lt;br /&gt;
For CSS you can add server-side compilation of SASS, Stylus and LESS.&lt;br /&gt;
&lt;br /&gt;
Just type:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;npm install module_name
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h2&gt;



What about testing and deployment?&lt;/h2&gt;
&lt;br /&gt;
There are gerkins and &lt;a href=&quot;https://github.com/cucumber/cucumber-js&quot;&gt;Cucumber&lt;/a&gt; test runners, &lt;a href=&quot;http://pivotal.github.com/jasmine/&quot;&gt;Jasmine BDD&lt;/a&gt; and qunit support. Heroku and Joyent will host your Node app in the cloud.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;



Ok, shutup and take my money.&lt;/h2&gt;
&lt;br /&gt;
The easiest way to get started is to use &lt;a href=&quot;http://c9.io/&quot;&gt;Cloud9 IDE&lt;/a&gt; which gives you a completly browser based IDE with automatic deployment to Heroku.&lt;br /&gt;
&lt;br /&gt;
To get started on Windows, download the windows installer from &lt;a href=&quot;http://nodejs.org/&quot;&gt;NodeJS.org&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/6341289081794258232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5119507428537231083/posts/default/6341289081794258232'/><link rel='alternate' type='text/html' href='http://braintostring.blogspot.com/2012/01/why-node-js.html' title='Why Node JS'/><author><name>Chris Jones</name><uri>http://www.blogger.com/profile/14797995061007423145</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJImRE66_-21Q_JdjyEx0h2qK4S6ymJYCg7-dVQNuvcmWhykRNSGYh55PmcBfaIZe--noSN0nzK7QK3HaAqAa9FX4qHJ99BX1N8nO2DLQKNkEGq_gEdHhDeZBw8mpyGsk/s220/me.jpg'/></author></entry></feed>