Archive

Archive for March, 2015

Note to self: Try the WLW Code Plugin for next blog post

March 15, 2015 1 comment

From pure laziness, I sometimes post code as images even though a part of me dies every time. I tend to use Windows Live Writer to edit my posts and to publish to the wordpress.com hosting site. This is a convenient workflow that works for me. However, when it comes to posting code there are many options but… yeah, i guess that is it. There are TOO MANY damned options. And all have pros and cons. Scott Hanselman says it all in this post.

When I have posted code from Visual Studio I have used the Paste As Visual Studio Code plugin. I have also used to Copy As Html plugin in Visual Studio. It works but it generates ugly html with embedded styles. An also it only works when I use visual studio. When using Sublime or something else I am out of luck.

Hoping that the world had improved since the last time I evaluated my alternatives I set out on a quick google session today. Indeed the wordpress.com has added support for syntax highlighting , leveraging Alex Gorbatchev’s SyntaxHighlighter. This is good, but like I said, I like the Windows Live Writer. Continuing my search quest I found, and installed, a plugin that enables this feature from within my good old writer. It is called WLW code plugin.

So… next time… I am going to try this approach.

var message = "hello world";
alert(message);
Advertisements
Categories: Uncategorized

HRON parsing and serialization in node.js

I have been working on a javascript library for HRON parsing and serialization lately. The first focus was to get things up and running within a internet browser. Today I improved the library bundling and added support for node.js. It is still a bit of a work in progress but I am happy the way things are unfolding. Have a look at my little test below:

image 

(Click the image to reveal the actual code.)

The output is:

image

If you want to try it out you can install the hron.js package using the node package manager:

> npm install hron.js

Categories: Uncategorized