<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Software Engineering, Music, Sports</description><title>goatslacker</title><generator>Tumblr (3.0; @goatslacker)</generator><link>http://www.goatslacker.com/</link><item><title>Introducing node-typedjs</title><description>&lt;p&gt;&lt;a href="https://github.com/goatslacker/node-typedjs"&gt;node-typedjs&lt;/a&gt; is the node module, and more, for &lt;a href="http://typedjs.com"&gt;TypedJS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;TypedJS is described as &amp;#8220;lightweight program specifications for testing JavaScript&amp;#8221;&lt;/p&gt;
&lt;p&gt;In a nutshell you can annotate your functions with Haskell-like type signatures and then run a set of tests against those functions thus ensuring type safety. TypedJS will probably help you find some bugs in your code that you otherwise may not have found.&lt;/p&gt;
&lt;h2&gt;What it does&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;node-typedjs&lt;/code&gt; helps you test your JavaScript projects via the command line or programatically.&lt;/p&gt;
&lt;p&gt;It gives you access to a few neat features like &lt;code&gt;contracts&lt;/code&gt; via the &lt;code&gt;enforce()&lt;/code&gt; method which enforce the types at runtime.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;contracts&lt;/code&gt; can be used along with your unit tests to assert that your functions are behaving as intended.&lt;/p&gt;
&lt;p&gt;Similar to &lt;a href="http://disnetdev.com/contracts.coffee/"&gt;contracts.coffee&lt;/a&gt;, typedjs aims at solving the problem differently.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;TypedJS is focused on JavaScript. But it also works on CoffeeScript just as well.&lt;/li&gt;
&lt;li&gt;The type signatures are comments. So there is no extra compilation and the signatures are unobtrusive.&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;addition.js&lt;/code&gt; contains your function along with its type signature.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//+ add :: Number Number -&amp;gt; Number
function add(a, b) {
  return a + b;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;addition-test.js&lt;/code&gt; is your unit test as well as the typedjs checks.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var typedjs = require('typedjs');
var fs = require('fs');
var assert = require('assert');

typedjs.enforce(fs.readFileSync('addition.js').toString());

typedjs.run(function (context) {
  assert.equal(context.square(3), 9); // pass
  assert.equal(context.square('foo', 'bar'), 'foobar'); // fail
});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Even though both assertions would pass, the typedjs check will fail on the second call since a number is expected.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;node-typedjs&lt;/code&gt; will let you:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Run automated tests on your code.&lt;/li&gt;
&lt;li&gt;Run automated tests on functions individually.&lt;/li&gt;
&lt;li&gt;Extract all functions from a file (regardless of closures) and run automated tests on them.&lt;/li&gt;
&lt;li&gt;Use it along with your unit tests to assert your functions are behaving correctly.&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Getting node-typedjs&lt;/h2&gt;
&lt;p&gt;You will need &lt;a href="http://nodejs.org/#download"&gt;node.js&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Install using npm&lt;/p&gt;
&lt;p&gt;Locally:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ npm install typedjs&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Globally&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ npm install typedjs -g&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Standing on the shoulders of giants&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;node-typedjs&lt;/code&gt; would not be possible without open-source software such as&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="https://github.com/Proxino/TypedJS"&gt;TypedJS&lt;/a&gt; by &lt;a href="http://ethanfast.com/"&gt;Ethan Fast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ariya/esprima"&gt;esprima&lt;/a&gt; by &lt;a href="http://ariya.ofilabs.com/about"&gt;Ariya Hidayat&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Resources&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="https://github.com/goatslacker/node-typedjs"&gt;Fork this project on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/goatslacker/node-typedjs/issues"&gt;Report Issues&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/goatslacker/node-typedjs/wiki/Type-Syntax"&gt;Type Signatures Reference Manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://typedjs.com/"&gt;TypedJS website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/goatslacker"&gt;Follow me on Twitter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;License&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://josh.mit-license.org"&gt;MIT LICENSE&lt;/a&gt;&lt;/p&gt;</description><link>http://www.goatslacker.com/post/18381591530</link><guid>http://www.goatslacker.com/post/18381591530</guid><pubDate>Mon, 27 Feb 2012 08:00:05 -0800</pubDate><category>javascript</category><category>coffeescript</category><category>type safety</category><category>haskell</category><category>type signatures</category><category>code quality</category><category>testing</category><category>unit tests</category><category>contracts</category><category>node.js</category><category>static typing</category></item><item><title>Adding a CoffeeScript project to Travis-CI</title><description>&lt;p&gt;Say you have this project you wrote in CoffeeScript and you want to add it to &lt;a href="http://travis-ci.org/"&gt;Travis-CI&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;but you do not want to include the compiled output in your code repository. Well, you will need to tell Travis to compile your project first before running the tests otherwise they would fail.&lt;/p&gt;
&lt;p&gt;But how?&lt;/p&gt;
&lt;p&gt;Add this to your &lt;code&gt;.travis.yml&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;before_script:
  coffee -c -o lib src&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Commands under &lt;code&gt;before_script&lt;/code&gt; run &lt;em&gt;before&lt;/em&gt; the unit tests are ran. So use CoffeeScript to compile your project before running the tests.&lt;/p&gt;
&lt;p&gt;You will obviously need &lt;code&gt;coffee-script&lt;/code&gt; as a dev_dependency in your &lt;code&gt;package.json&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;"devDependencies": {
  "coffee-script": "latest"
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alternatively you can just use &lt;a href="https://github.com/goatslacker/cakefile-template"&gt;this Cakefile&lt;/a&gt; and add the following to your &lt;code&gt;package.json&lt;/code&gt; instead&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;"scripts": {
  "test": "cake test"
}&lt;/code&gt;&lt;/pre&gt;</description><link>http://www.goatslacker.com/post/18056109174</link><guid>http://www.goatslacker.com/post/18056109174</guid><pubDate>Tue, 21 Feb 2012 20:54:00 -0800</pubDate><category>coffeescript</category><category>node.js</category><category>travis-ci</category><category>continuous integration</category><category>cakefile</category><category>npm</category></item><item><title>Security questions are not secure</title><description>&lt;h1&gt;&lt;/h1&gt;
&lt;p&gt;As I was signing up for a service today, which deals with money, I was asked to go through an extensive process in the name of security.&lt;/p&gt;
&lt;p&gt;There was a special &amp;#8220;security picture&amp;#8221; assigned to me to protect me from phishing.&lt;/p&gt;
&lt;p&gt;Then there was the ridiculous password requirements:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;8-14 characters in length&lt;/li&gt;
&lt;li&gt;Must contain 2 numbers and an uppercase letter&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;But aside from that nonsense, the part that bothered me the most was when they asked me to set up &amp;#8220;security questions&amp;#8221;, you know, in case I forget my ridiculous password.&lt;/p&gt;
&lt;p&gt;My question options were limited to a few, including these:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;What is your current best friend&amp;#8217;s name?&lt;/li&gt;
&lt;li&gt;In what city were you married?&lt;/li&gt;
&lt;li&gt;What is your favorite book?&lt;/li&gt;
&lt;li&gt;What hospital were you born in?&lt;/li&gt;
&lt;li&gt;Who is your favorite athlete?&lt;/li&gt;
&lt;li&gt;What was your high school mascot?&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;All of which I can easily pull the answers to from a social media site, public records, or social engineering.&lt;/p&gt;
&lt;p&gt;Which leads me to lie on all the questions in an attempt to be &amp;#8220;secure&amp;#8221;.&lt;/p&gt;
&lt;p&gt;Then I&amp;#8217;ll not only forget my stupid 8-14 character random password with two numbers in it (was it 29 or 41?) but I&amp;#8217;ll also forget the lies I used to answer (was I married on the moon or in the pacific ocean?).&lt;/p&gt;
&lt;p&gt;In which I case I&amp;#8217;m sure they&amp;#8217;ll have a mechanism where I can contact customer support and just tell them my zip code and I&amp;#8217;ll be granted access to my account. Everything will be ok.&lt;/p&gt;</description><link>http://www.goatslacker.com/post/17409885969</link><guid>http://www.goatslacker.com/post/17409885969</guid><pubDate>Fri, 10 Feb 2012 20:46:00 -0800</pubDate><category>security</category><category>rant</category><category>passwords</category><category>phishing</category><category>social engineering</category></item><item><title>How to obtain harmony in your node.js</title><description>&lt;p&gt;&lt;strong&gt;UPDATE!&lt;/strong&gt; &lt;a href="https://twitter.com/3rdEden"&gt;3rdEden&lt;/a&gt; has &lt;a href="https://twitter.com/#!/3rdEden/status/159748109012959233"&gt;pointed&lt;/a&gt; &lt;a href="http://cl.ly/0K1H3b1j1J072l1h3X3V"&gt;out&lt;/a&gt; that it&amp;#8217;s possible to get harmony in node 0.6&lt;/p&gt;
&lt;p&gt;You can get it by using a flag when invoking node through the command line&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;node --harmony_typeof --harmony_block_scoping --harmony_proxies --harmony_weakmaps file.js&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or if you&amp;#8217;re using node 0.7.x&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;node --harmony file.js&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Harmony!!!!1&lt;/p&gt;
&lt;hr&gt;&lt;p&gt;Enable ECMAScript’s new features and syntax in node point javascript.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.nodejs.org/2012/01/16/node-v0-7-0-unstable/"&gt;Node unstable has just been released&lt;/a&gt; and with that V8 has been upgraded to 3.8.6 which contains &lt;a href="http://www.google.com/codesearch#W9JxUuHYyMg/trunk/src/flag-definitions.h&amp;amp;q=harmony%20package:http://v8%5C.googlecode%5C.com&amp;amp;l=109"&gt;flags for experimental language features&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By default those flags are turned off, but you can always turn them on. Here’s how:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download node 0.7.0.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you’ve got it cloned on git run a &lt;code&gt;git fetch&lt;/code&gt; and then &lt;code&gt;git checkout v0.7.0&lt;/code&gt; otherwise read the &lt;a href="http://blog.nodejs.org/2012/01/16/node-v0-7-0-unstable/"&gt;release notes&lt;/a&gt; for instructions on where to download.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Set harmony flag to true in V8&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once you’ve got the source code, open up &lt;code&gt;deps/v8/src/flag-definitions.h&lt;/code&gt; and look for Line 115&lt;/p&gt;
&lt;p&gt;Change the flag from &lt;code&gt;false&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;DEFINE_bool(harmony, true, "enable all harmony features")&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Compile Node&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Have fun!&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function foo() {
  "use strict";
  let i = -1;

  for (let i = 0; i &amp;lt; 10; i += 1) {
    console.log(i); // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  }

  console.log(i); // -1
}

foo();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; you’ll need to use &lt;code&gt;"use strict";&lt;/code&gt; otherwise the code above will not run.&lt;/p&gt;
&lt;p&gt;By doing this you’ll get:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Sets, Maps, and Weak Maps&lt;/li&gt;
&lt;li&gt;Block scoping&lt;/li&gt;
&lt;li&gt;Proxies&lt;/li&gt;
&lt;li&gt;New typeof semantics&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Learn more about &lt;a href="http://wiki.ecmascript.org/doku.php?id=harmony:harmony"&gt;ES harmony&lt;/a&gt;&lt;/p&gt;</description><link>http://www.goatslacker.com/post/16000243520</link><guid>http://www.goatslacker.com/post/16000243520</guid><pubDate>Tue, 17 Jan 2012 00:12:00 -0800</pubDate><category>ecmascript</category><category>es6</category><category>esnext</category><category>harmony</category><category>javascript</category><category>node.js</category><category>v8</category></item><item><title>Why vim-powerline wasn't working properly with some of my files</title><description>&lt;p&gt;Recently I&amp;#8217;ve been using this vim plugin called &lt;a href="https://github.com/Lokaltog/vim-powerline"&gt;vim-powerline&lt;/a&gt; which has plenty of nice features like&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Which git branch you&amp;#8217;re currently on&lt;/li&gt;
&lt;li&gt;Filetype and encoding&lt;/li&gt;
&lt;li&gt;Line number/Character&lt;/li&gt;
&lt;li&gt;Changes color for Insert mode&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I highly recommend it.&lt;/p&gt;

&lt;p&gt;Anyways, &lt;code&gt;vim-powerline&lt;/code&gt; wasn&amp;#8217;t working properly on my laptop though. Some files like &lt;code&gt;.gitignore&lt;/code&gt; would work whereas others like &lt;code&gt;sample.coffee&lt;/code&gt; wouldn&amp;#8217;t. If I removed my &lt;code&gt;~/.vim/ftdetect&lt;/code&gt; folder most files would work but that wasn&amp;#8217;t the solution.&lt;/p&gt;

&lt;p&gt;I finally narrowed it down to my custom syntax highlighting colour scheme &lt;a href="https://github.com/goatslacker/mango.vim"&gt;mango.vim&lt;/a&gt;. The offending line was this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;highlight clear
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After looking into it I found out that &lt;code&gt;highlight clear&lt;/code&gt; was clearing all of &lt;code&gt;vim-powerline's&lt;/code&gt; styles so for files where syntax highlighting was turned on, the plugin wasn&amp;#8217;t working as expected.&lt;/p&gt;

&lt;p&gt;So if you&amp;#8217;re having difficulties installing vim-powerline, check to make sure your color scheme isn&amp;#8217;t clearing highlights. Dark color schemes commonly have this set.&lt;/p&gt;

&lt;p&gt;Installing &lt;code&gt;vim-powerline&lt;/code&gt; is fairly easy. You&amp;#8217;ll need to be on an 88 || 256 color terminal &amp;#8212; so if you&amp;#8217;re on OSX I definitely recommend &lt;a href="http://www.iterm2.com/#/section/home"&gt;iTerm2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;.vimrc&lt;/code&gt; file you&amp;#8217;ll set the following&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set nocompatible
set t_Co=256
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Make sure &lt;code&gt;Powerline.vim&lt;/code&gt; is in &lt;code&gt;~/.vim/plugin/&lt;/code&gt; and &lt;code&gt;Pl&lt;/code&gt; folder and &lt;code&gt;Pl.vim&lt;/code&gt; is in &lt;code&gt;~/.vim/autoload/&lt;/code&gt; and you should be all set.&lt;/p&gt;</description><link>http://www.goatslacker.com/post/15818413221</link><guid>http://www.goatslacker.com/post/15818413221</guid><pubDate>Fri, 13 Jan 2012 23:31:02 -0800</pubDate><category>highlighting</category><category>mango.vim</category><category>syntax</category><category>vim</category><category>vim-powerline</category><category>vimrc</category></item><item><title>On case against coffeescript...</title><description>&lt;a href="http://ryanflorence.com/2011/2012/case-against-coffeescript/"&gt;On case against coffeescript...&lt;/a&gt;: &lt;p&gt;There are basically a few arguments against using CoffeeScript and at the end of the article Ryan Florence suggests one to not use it. It basically boils down to these cases:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Debugging is an issue&lt;/li&gt;
&lt;li&gt;Verbally Readable !== Quicker Comprehension&lt;/li&gt;
&lt;li&gt;One liners are horrible&lt;/li&gt;
&lt;li&gt;CoffeeScript has it’s bad parts&lt;/li&gt;
&lt;li&gt;Significant whitespace + Spaghetti code is bad&lt;/li&gt;
&lt;li&gt;CoffeeScript will never be supported natively.&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Debugging is an issue&lt;/h2&gt;
&lt;p&gt;So yes, debugging is an issue. Hopefully this can be solved soon by  &lt;a href="https://github.com/mozilla/source-map"&gt;SourceMap&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Verbally Readable does not mean Quicker Comprehension.&lt;/h2&gt;
&lt;p&gt;I agree, in fact I comprehend &lt;code&gt;Verbally Readable !== Quicker Comprehension&lt;/code&gt; quicker than I do the title. But the nice thing about CoffeeScript is that &lt;strong&gt;it’s just JavaScript&lt;/strong&gt; so the lengthy wordy operators are &lt;em&gt;optional.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You could always write in CoffeeScript:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;one &amp;&amp; two &amp;&amp; three
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead of&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;one and two and three
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;One liners are horrible&lt;/h2&gt;
&lt;p&gt;Here’s an example from the blog:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;scores = (student["assignment_#{@assignment.id}"].score for own idx, student of @gradebook.students when student["assignment_#{@assignment.id}"]?.score?)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Right, that’s not easy to comprehend. In this particular case I don’t blame the language but the author.&lt;/p&gt;
&lt;p&gt;Sure the CoffeeScript documentation touts how it turns verbose JavaScript into “nice” and “sexy” one-liners but that doesn’t mean one should abuse it.&lt;/p&gt;
&lt;h2&gt;CoffeeScript has it’s bad parts&lt;/h2&gt;
&lt;p&gt;So does every other language. I  think the good parts of the language outweigh the bad parts.&lt;/p&gt;
&lt;h2&gt;Significant whitespace + spaghetti code is bad&lt;/h2&gt;
&lt;p&gt;Spaghetti code itself is bad. I don’t care what language you write it in. It’ll always look like shit.&lt;/p&gt;
&lt;p&gt;It seems like now we’re talking about preferring one type of spaghetti over another type of spaghetti — it’s still spaghetti.&lt;/p&gt;
&lt;h2&gt;CoffeeScript will never be supported natively&lt;/h2&gt;
&lt;p&gt;Is that really a bad thing?&lt;/p&gt;
&lt;h2&gt;Overall&lt;/h2&gt;
&lt;p&gt;I still believe the expressiveness and useful features that CoffeeScript provides outweighs the biggest problem which is debugging.&lt;/p&gt;</description><link>http://www.goatslacker.com/post/14192251296</link><guid>http://www.goatslacker.com/post/14192251296</guid><pubDate>Tue, 13 Dec 2011 17:17:00 -0800</pubDate><category>coffeescript</category><category>javascript</category></item><item><title>Introducing gister</title><description>&lt;a href="https://github.com/goatslacker/gister"&gt;Introducing gister&lt;/a&gt;: &lt;p&gt;A nodejs module for programmatic access to create, edit and retrieve gists from github.&lt;/p&gt;
&lt;p&gt;There are quite a few gist libraries available from npm. Most were CLI apps to create new gists, others didn’t exactly meet my needs. So I set out to create &lt;code&gt;gister&lt;/code&gt; which provides what I think is a simple API. It follows the observer pattern and uses &lt;code&gt;request&lt;/code&gt; to talk to GitHub.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://goatslacker.github.com/gister"&gt;Read the annotated source&lt;/a&gt; or check out &lt;a href="https://github.com/goatslacker/gister"&gt;the code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using it is really simple. Here’s how you retrieve a gist with &lt;code&gt;gist_id = 1&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var gist = new Gist({ gist_id: 1 });
gist.on('get', function (data) {
  // do something with data
});
gist.get();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Creating a new gist is similar, although you’ll need to provide Gist with your GitHub username and Secret API Token which can be found in your &lt;a href="https://github.com/account/admin"&gt;Account Settings&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var gist = new Gist({ username: 'goatslacker', token: 'abc123' });
gist.on('created', function (data, gist_id) {
  // gist_id is the newly created gist id
  // data is what github returns in it's reply
});
gist.create();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Available on npm. Install:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npm install gister
&lt;/code&gt;&lt;/pre&gt;</description><link>http://www.goatslacker.com/post/14063661035</link><guid>http://www.goatslacker.com/post/14063661035</guid><pubDate>Sun, 11 Dec 2011 05:57:00 -0800</pubDate><category>cli</category><category>gist</category><category>github</category><category>javascript</category><category>node.js</category><category>npm</category></item><item><title>Adding node.js project that uses git-submodules to travis-ci</title><description>&lt;p&gt;Recently, I added my projects&lt;a href="http://travis-ci.org/#!/goatslacker/node-fixmyjs"&gt; node-fixmyjs&lt;/a&gt; &lt;a href="http://travis-ci.org/#!/goatslacker/jshint-autofix"&gt;jshint-autofix&lt;/a&gt; to &lt;a href="http://travis-ci.org/"&gt;Travis-CI&lt;/a&gt; which is excellent. Travis is a build system for the open source community, I recommend you take a look at it if you haven’t.&lt;/p&gt;
&lt;p&gt;Anyways, both of my projects depended on submodules and the tests were initially failing because I didn’t know how to tell Travis to download the submodules before running the unit tests.&lt;/p&gt;
&lt;p&gt;So here’s what you’re supposed to put in your &lt;code&gt;.travis.yml&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;language: node_js
node_js:
  - 0.6
before_install:
  git submodule init &amp;amp;&amp;amp; git submodule --quiet update
&lt;/code&gt;&lt;/pre&gt;</description><link>http://www.goatslacker.com/post/14007739279</link><guid>http://www.goatslacker.com/post/14007739279</guid><pubDate>Sat, 10 Dec 2011 00:45:00 -0800</pubDate><category>code</category><category>continuous</category><category>integration</category><category>javascript</category><category>node.js</category><category>quality</category><category>ruby</category><category>travis-ci</category></item><item><title>http://me.veekun.com/blog/2011/12/04/fuck-passwords/</title><description>&lt;a href="http://me.veekun.com/blog/2011/12/04/fuck-passwords/"&gt;http://me.veekun.com/blog/2011/12/04/fuck-passwords/&lt;/a&gt;: &lt;p&gt;Great article on the state of web security. I wholeheartedly agree, it’s a pain in the ass to manage all your passwords and to make matters worse banks implement those ridiculous “security” guidelines/rules that they make up which end up making your passwords less secure.&lt;/p&gt;
&lt;p&gt;There’s got to be a better way.&lt;/p&gt;
&lt;p&gt;Until then I’ll just keep using my &lt;a href="http://github.com/goatslacker/hash"&gt;bookmarklet and web app&lt;/a&gt;&lt;/p&gt;</description><link>http://www.goatslacker.com/post/13774607844</link><guid>http://www.goatslacker.com/post/13774607844</guid><pubDate>Mon, 05 Dec 2011 02:06:00 -0800</pubDate><category>keys</category><category>passphrases</category><category>passwords</category><category>security</category></item><item><title>You are not a language, but you should filter your opportunities by them.</title><description>&lt;p&gt;A couple days ago I came across this interesting blog post &lt;a href="http://restrictionisexpression.com/post/13112621228/developers-you-are-not-a-language"&gt;Developers: You are not a Language&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I agree, we aren’t languages, we’re people and as the blog states we are also “problem-crushing warrior[s]” and “architect[s] of logic”&lt;/p&gt;
&lt;p&gt;What I don’t agree with is not filtering job opportunities by language.&lt;/p&gt;
&lt;p&gt;Someone once told me “It’s just a tool” referring to a programming language we were discussing when I made a certain remark about that particular language. And that person is 100% correct, programming languages are just tools and you should use the right tool for the right job. But some people perhaps don’t like to use certain tools, or they don’t like to solve the problems that those tools are fit for.&lt;/p&gt;
&lt;p&gt;I actually like thinking of programming languages more as a weapon. One that takes time, practice and patience to master. A weapon that is fun to learn and use once you master it.&lt;/p&gt;
&lt;p&gt;The post says that if you look for a “ruby job” you’ll end up with a “ruby job” but if you look for a “great opportunity” then you’ll find that.&lt;/p&gt;
&lt;p&gt;Well why can’t you look for a great opportunity where you’ll end up using ruby? You can. Opportunities are everywhere and great is subjective.&lt;/p&gt;
&lt;p&gt;So my advice is to seek the best opportunity which will let you wield whatever weapon you’re most interested in.&lt;/p&gt;</description><link>http://www.goatslacker.com/post/13496227007</link><guid>http://www.goatslacker.com/post/13496227007</guid><pubDate>Tue, 29 Nov 2011 02:51:00 -0800</pubDate><category>happiness</category><category>jobs</category><category>languages</category><category>life</category><category>opportunities</category><category>programming</category><category>recruting</category><category>ruby</category><category>silicon</category><category>valley</category></item><item><title>Excellent JavaScript resources for all</title><description>&lt;a href="http://www.modernnerds.com/2011/11/excellent-javascript-resources-for-beginners-to-veterans/"&gt;Excellent JavaScript resources for all&lt;/a&gt;: &lt;p&gt;A compilation of great JavaScript articles found on excellent blogs. Must read if you’re into JS&lt;/p&gt;</description><link>http://www.goatslacker.com/post/13337263774</link><guid>http://www.goatslacker.com/post/13337263774</guid><pubDate>Fri, 25 Nov 2011 22:18:36 -0800</pubDate><category>JavaScript</category></item><item><title>Hash - Throwaway passwords</title><description>&lt;a href="http://goatslacker.github.com/hash/"&gt;Hash - Throwaway passwords&lt;/a&gt;: &lt;p&gt;Staying secure online is a difficult task.&lt;/p&gt;

&lt;p&gt;When you sign up for a service, you’re giving someone your password so recycling passwords is usually a bad idea. If you use the same password everywhere all it takes is one security breach.&lt;/p&gt;

&lt;p&gt;But, managing an entire drawer of passwords is really difficult. There are solutions available both online and natively that allow you to manage multiple passwords, but I’ve yet to come accross a solution that works everywhere and I feel ok about it.&lt;/p&gt;

&lt;p&gt;So this afternoon I created this web application which will take a domain name, and a master password and return you a hash. The password is generated on your computer using JavaScript so nothing is sent over the network. You can then use the hash, or part of the hash, as your password. There is also a bookmarklet available which automatically detects password fields and fills them in for you.&lt;/p&gt;

&lt;p&gt;This isn’t 100% bulletproof as there are still other ways you may be attacked like phishing and keyloggers, but at least it’s better than recycling passwords or trying to remember a dozen different passwords.&lt;/p&gt;

&lt;p&gt;The site is built with &lt;a href="https://github.com/twitter/bootstrap"&gt;Twitter’s Bootstrap&lt;/a&gt; library and uses &lt;a href="https://github.com/bitwiseshiftleft/sjcl"&gt;Stanford’s JavaScript Cryptography Library&lt;/a&gt; the app itself is built in CoffeeScript.&lt;/p&gt;

&lt;p&gt;Give it a whirl and I’d appreciate some feedback.&lt;/p&gt;</description><link>http://www.goatslacker.com/post/13187872163</link><guid>http://www.goatslacker.com/post/13187872163</guid><pubDate>Tue, 22 Nov 2011 19:09:39 -0800</pubDate><category>bootstrap</category><category>coffeescript</category><category>cryptography</category><category>hash</category><category>javascript</category><category>online</category><category>password</category><category>security</category><category>sha</category><category>sha256</category><category>twitter</category></item><item><title>Fixmyjs.com Fixes your JavaScript</title><description>&lt;a href="http://fixmyjs.com"&gt;Fixmyjs.com Fixes your JavaScript&lt;/a&gt;: &lt;p&gt;I built this a couple weekends ago — it’s based off of my nodejs tool jshint-autofix `npm install fixmyjs` &lt;a href="http://github.com/goatslacker/jshint-autofix"&gt;http://github.com/goatslacker/jshint-autofix&lt;/a&gt; which in turn sits on top of JSHint.&lt;/p&gt;
&lt;p&gt;The goal is to detect errors in your code and automatically fix them while making sure your program still functions as intended. It’s a difficult goal to attain since I do have to destroy the code in some instances in order to “fix” it. This is why I have unit tests and include popular libraries such as jQuery and Backbone in the unit tests.&lt;/p&gt;
&lt;p&gt;Check out the site and let me know what you think!&lt;/p&gt;</description><link>http://www.goatslacker.com/post/13105614425</link><guid>http://www.goatslacker.com/post/13105614425</guid><pubDate>Mon, 21 Nov 2011 00:29:13 -0800</pubDate><category>javascript</category><category>nodejs</category><category>lint</category><category>jshint</category><category>jslint</category><category>code quality</category><category>programming</category></item><item><title>Introducing Fly!</title><description>&lt;a href="https://github.com/goatslacker/fly"&gt;Introducing Fly!&lt;/a&gt;: &lt;p&gt;&lt;span&gt;
&lt;p&gt;Pretty colors for your console applications written using NodeJS&lt;/p&gt;
&lt;p&gt;Easily output some styles to console from your NodeJS application.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;256 colors! (for the cool terminals that support it)&lt;/li&gt;
&lt;li&gt;Show your output in style, it’s dead simple&lt;/li&gt;
&lt;li&gt;Variables, Functions, Interpolation&lt;/li&gt;
&lt;li&gt;Easy to write templates&lt;/li&gt;
&lt;li&gt;Small library&lt;/li&gt;
&lt;li&gt;Did I mention it was easy to use?&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Get it via npm:&lt;/p&gt;
&lt;p&gt;npm install fly&lt;/p&gt;
&lt;p&gt;And checkout the README on GitHub&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;</description><link>http://www.goatslacker.com/post/7469468660</link><guid>http://www.goatslacker.com/post/7469468660</guid><pubDate>Sun, 10 Jul 2011 15:42:39 -0700</pubDate><category>fly</category><category>nodejs</category><category>github</category><category>open-source</category><category>javascript</category><category>templates</category><category>console</category><category>terminal</category><category>linux</category><category>unix</category><category>npm</category></item><item><title>Multiplayer Online Game with #nodejs</title><description>&lt;a href="https://github.com/goatslacker/KickAss"&gt;Multiplayer Online Game with #nodejs&lt;/a&gt;: &lt;p&gt;The game is actually a bookmarklet originally developed by Erik Anderson (erkie.github.com) which allowed you to blow up DOM nodes in a webpage. I went ahead and modified the code to pit player vs player in ultimate HTML5 canvas warfare, utilizing Socket.IO (Guillermo Rauch) and I wrote a small server app for it using NodeJS. It’s opensource, and available on github.&lt;/p&gt;
&lt;p&gt;I’m looking to change the name so it doesn’t conflict with a hollywood flick. Any suggestions? So far I’ve got things like: CloudFighter and Node Gladiators&lt;/p&gt;
&lt;p&gt;I’m also looking for help, if anyone wants to code or host it, let me know!&lt;/p&gt;
&lt;p&gt;I’ll be adding a public server in a week or two just for testing. Stay tuned.&lt;/p&gt;</description><link>http://www.goatslacker.com/post/5599197066</link><guid>http://www.goatslacker.com/post/5599197066</guid><pubDate>Tue, 17 May 2011 21:58:26 -0700</pubDate><category>html5</category><category>javascript</category><category>canvas</category><category>programming</category><category>socket.io</category><category>nodejs</category><category>server side javascript</category></item><item><title>out of nowhere: whatever happened to the lsdj patchbook? i have bandwidth to burn; if you still have backups of it I'd be more than willing to import them on my server. i'm not especially interested in moderating it, but if it needs a home i can provide one.</title><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Unfortunately my ex-host killed off the server and deleted the database :( I’ve made the project open-source — it’s available on github for forking or creating your own patch server: &lt;a href="https://github.com/goatslacker/LSDJ-Patch-Book"&gt;https://github.com/goatslacker/LSDJ-Patch-Book&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I wouldn’t mind working on it again or fixing it up if people start using it again :)&lt;/p&gt;</description><link>http://www.goatslacker.com/post/5598883474</link><guid>http://www.goatslacker.com/post/5598883474</guid><pubDate>Tue, 17 May 2011 21:42:31 -0700</pubDate></item><item><title>Balloon Go Boom! on webOS</title><description>&lt;p&gt;So I had been working on this app since about February of 2009. First the idea spawned and then I wrote all the logic for the game, I hit a small roadblock with the goals I was trying to accomplish and other things came up in life so I placed this project on the back burner. A year and a couple months later I pick up the project again and I polish it up into a nice webOS application. And Palm released it shortly thereafter.&lt;/p&gt;
&lt;p&gt;I created both paid and an ad supported free version of the game. It&amp;#8217;s available for download via the App Catalog.&lt;/p&gt;
&lt;p&gt;Check it out here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.precentral.net/app-gallery/app-catalog/balloon-go-boom"&gt;&lt;a href="http://www.precentral.net/app-gallery/app-catalog/balloon-go-boom"&gt;http://www.precentral.net/app-gallery/app-catalog/balloon-go-boom&lt;/a&gt;&lt;br/&gt;&lt;/a&gt;&lt;a href="http://www.precentral.net/app-gallery/app-catalog/balloon-go-boom-lite"&gt;&lt;a href="http://www.precentral.net/app-gallery/app-catalog/balloon-go-boom-lite"&gt;http://www.precentral.net/app-gallery/app-catalog/balloon-go-boom-lite&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Screenshots:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://cdn.downloads.palm.com/public/5786/en/images/1/L/balloons_2010-23-08_163846.png"/&gt;&lt;img src="http://cdn.downloads.palm.com/public/5786/en/images/3/L/balloons_2010-23-08_164008.png"/&gt;&lt;/p&gt;</description><link>http://www.goatslacker.com/post/2067656319</link><guid>http://www.goatslacker.com/post/2067656319</guid><pubDate>Wed, 01 Dec 2010 20:34:40 -0800</pubDate><category>balloon go boom</category><category>webOS</category><category>palm</category><category>hp</category><category>balloons</category><category>bubble</category><category>javascript</category><category>programming</category><category>games</category><category>video games</category></item><item><title>driving into the darkness</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_l7ytrhbULg1qdp003o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;driving into the darkness&lt;/p&gt;</description><link>http://www.goatslacker.com/post/1036628725</link><guid>http://www.goatslacker.com/post/1036628725</guid><pubDate>Mon, 30 Aug 2010 05:38:10 -0700</pubDate><category>rain</category><category>miami</category><category>clouds</category><category>darkness</category><category>photography</category><category>ne</category></item><item><title>5 Reasons (or more) why I love webOS - in no particular order  </title><description>&lt;p&gt;&lt;strong&gt;Synergy&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From the calendar, to the contacts, to facebook and google, synergy brings in all this into a neat little package. I thought this was really nice when I first used Synergy, but I never really knew how amazing it is until I replaced my phone. Restoring all my applications, contacts, and calendars was as easy as logging into my Palm Profile and the other accounts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;webOS Community&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Second to none is the webOS community. The most zealous and passionate mobile phone community. It is most evident by the way homebrew has taken off and how the good people over at webOS internals, webOS Roundup, precentral (just to name a few) have dedicated countless of hours to making this the best mobile operating system in the world.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Homebrew&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Speaking of the webOS community, the homebrew available for this phone is out of this world. I&amp;#8217;m not only talking applications, but rather patches and pushing the limits of the hardware. I think what makes webOS so much better than all the other mobile OS out there is customization and how easy it is for anyone to customize their device to their liking. I&amp;#8217;m talking brightness controls to overclocking the CPU to 1GHz to visual changes to the icons in the launcher. The customizations are endless and instead of being displayed in a tedious wall-of-settings type of display, they are provided by the wonderful homebrew installer Preware.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Palm (and now HP)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;They do know how to win over loyal customers. They take the cake by being hard at work at providing mobile OS updates very frequently, accepting and embracing homebrew, giving back to the webOS community, and for their work in the open-source community. Their developer relations team also merits some thanks for their hard work too.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;webOS SDK+PDK&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;By far the most developer-friendly SDK ever created. Sure there are some quirks here and there but it&amp;#8217;s definitely very solid and provides plenty of options. What&amp;#8217;s best is that if the SDK doesn&amp;#8217;t suit your needs then you can use the PDK.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HTML5, JS, CSS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This was a genius idea. I believe the future is in the web, and the future is in the cloud. And Palm made a genius move by making the web the core of their operating system. This will help advance the future of web development and better our current web technology standards. Thanks Palm!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Type to Search&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sick feature. And with synergy it&amp;#8217;s even better. This makes finding anything on your find quick and painless, as well as dialing phone numbers, visiting websites or just searching for information online.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gesture Area&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Another excellent, innovative feature. The solution to the back/forward button problem, now with no buttons! But the gesture area is so much more than that. Context menus, shortcuts, advanced gestures. What better way to put that dead space beneath your screen to better use?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Multitasking&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;True, real, multitasking. Multitasking, done the right way. This isn&amp;#8217;t a cheap trick in multitasking. Applications actually run fully in the background and switching between each application is seamless. Best of all, closing an application actually closes it. Hands down the best multitasking experience on any mobile OS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notifications&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The unobtrusive notification system along with the complete and total control the user has over individual notifications makes this notification system the best out of any mobile OS out there.&lt;/p&gt;</description><link>http://www.goatslacker.com/post/1016412272</link><guid>http://www.goatslacker.com/post/1016412272</guid><pubDate>Thu, 26 Aug 2010 15:37:47 -0700</pubDate><category>webOS</category><category>web development</category><category>mobile OS</category><category>mobile</category><category>phone</category><category>palm</category><category>palm pre</category><category>pre</category><category>synergy</category><category>javascript</category><category>html5</category><category>css</category><category>multitasking</category><category>gestures</category><category>HP</category><category>precentral</category><category>preware</category></item><item><title>Remembering this awesome night!</title><description>&lt;iframe width="400" height="240" src="http://www.youtube.com/embed/EPqQAG94Vbs?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Remembering this awesome night!&lt;/p&gt;</description><link>http://www.goatslacker.com/post/1004752609</link><guid>http://www.goatslacker.com/post/1004752609</guid><pubDate>Tue, 24 Aug 2010 12:32:50 -0700</pubDate><category>muse</category><category>msg</category><category>new york</category><category>madison square garden</category><category>helsinki jam</category><category>the resistance</category></item></channel></rss>

