Showing posts with label CoffeeScript. Show all posts
Showing posts with label CoffeeScript. Show all posts

September 18, 2012

JSON format command line utility

Very often I need to format a single-line JSON, so I can read it easily.

Even though modern browser developer tools do it nicely with server responses in preview tab, I want to be able to do something similar with local files.

Node.js has a very good API to work both with JSON and file system. So I created this simple command line utility in CoffeeScript. It accepts the input file name as a 1st parameter and the output file as an optional 2nd parameter. If the output file name is undefined, it writes the result to the console.

June 2, 2012

CoffeeScript version of the time span formatter between now and the date specified in a "Facebook way"

Earlier I published an ActionScript utility method that allows you to format the time span between now and the date specified in a "Facebook way".

Now I port it to CoffeeScript.

You can notice that the code is very similar, but thanks to CoffeeScript native string interpolation it is shorter and easier to read and understand!

You are welcome to contribute at https://github.com/skovalyov/time-format!

June 1, 2012

Game Lines made with CoffeeScript and Stylus

Try my game Lines at http://skovalyov.github.com/game-lines.

The source code is available at https://github.com/skovalyov/game-lines.

A lot of improvements to be done, but you can already play!

I plan to optimize for mobile, make the animation smoother, handle game over properly, introduce different complexity levels and high scores: global, today and probably personal.

Stay tuned and you are welcome to join!