Saturday, 29 September 2012
Monday, 24 September 2012
I've been using jsPlumb in a recent project to draw some fun visualisations in conjunction with meteor.js and my thoughts on jsPlumb are very positive. jsPlumb is fast to load, draw and redraw connections, it integrates with various different JS frameworks and it's pretty simple to use. About the only criticism I have is that it would be nice if you could influence the connection routing with a bit more precision, or simply have the ability to set up some elements that the connector should try to avoid.
Integrating the library with meteor.js was as easy as placing the jquery jsplumb plugin file into the client/lib directory of the project.
Monday, 17 September 2012
Turnip is a cool RSpec extension, bring the goodness of Gherkin business readable DSL. But - like Gherkin - it's sensitive to shell encoding. I run Gentoo, so to fix
Encoding::InvalidByteSequenceError I use
Thanks to stackoverflow
Thursday, 13 September 2012
I also also set the ROOT_URL environment variable for my application as I wanted to generate absolute urls from meteor.
Previously, I also needed to set the PORT environment variable to $VMC_APP_PORT but this no longer appears to be necessary. If it is necessary for future deployments, the same process is used as for the MONGO_URL variable.
fiberspackage bundled with meteor. This was solved by removing the bundled package and reinstalling the
fiberspackage from NPM with the bundled code. As this is needed each time, I wrote the following short script to automate the process (and also store the code that was released).
With this script in place, I can now deploy to Appfog reliably whenever I need to, without having to remember a set of file modifications.
Thanks go to http://blog.philkershaw.me/2012/06/deploy-meteor-to-appfog.html as the starting point for my deployment.
Wednesday, 12 September 2012
Turns out that that IE doesn't always play well with
In particular, on IE9 calling
console.debug fails with
Object doesn't support property or method 'debug'
console.debug is deprecated, I took this opportunity to
grep and replace
console.debug calls with
console.log but its wise to remember to add the console shim for troublesome older versions.
Tuesday, 11 September 2012
IE9 when development's almost over, learning to play with its little ways. We were taking
beforeunload to display a dialog whenever the user risks losing data by navigating away — but only then. IE9 (oddly) displays
null in a dialog when
null is returned from
undefined instead means harmony amongst browsers. Another little trick to add to the playbook...
JSparklines is a cool JQuery plugin for drawing sparklines — small, in-line graphs. This library uses css injection. In development mode, IE9 raised an
Invalid argument error when this was called. A little bit cryptic, but after a little digging, the cause turned out to be that hard limit. Time to tinker.
To serve fully processed assets in development: edit
config.assets.debug = false