Rapid Local Development with Vagrant, Docker and Node.js

Posted on 07 June 2015 in Programming

TLDR Using a cascade of Vagrant shared directories, Docker volumes and cleverly placed symlinks, you can rig Vagrant and Docker to instantly reflect your local application code updates. Docker volume -> Vagrant shared directory -> Host machine code. Enable NPM link style development in Docker container. Dosen't cover gulp webpack asset generation but you can figure it out. There might be a better way to do this or improvements to make. Leave it in the...

Read more...

How To Route Docker.io Containers To Public IPV6 on Linode

Posted on 25 June 2014 in Programming

If you want to us ipv6 with docker.io on linode make sure you have the following sysctl set net.ipv6.conf.all.accept_ra = 2 net.ipv6.conf.all.forwarding = 1 Then you can pretty much follow this post http://zargony.com/2013/10/13/ipv6-in-docker-containers If you want auto configured addresses you can install and configure radvd

Read more...

How To Manage Javascript Callbacks

Posted on 30 September 2012 in Programming

tldr; Abstract anonymous functions into named functions to avoid nesting callbacks. Avoid using local variables of a shared scope in nested anonymous functions. Abstract large JavaScript object declaration into smaller generator functions. Or 'How To Avoid Callback Hell'. I have been meaning to write this post for some time now. Basically since Node.js came onto the spotlight and people started complaining about JavaScript code maintainability and readability due to nested callbacks and other asynchronous patterns....

Read more...

Disable Any Element With jQuery

Posted on 05 July 2012 in Code

In HTML the disabled attribute alows you to mark an input element as 'disabled' Which will trigger the browser to render the input in a 'greyed out' style: Enabled elements Click Select Disabled elements Click Select This is helpful for limiting user interaction when an app is in an unknown state. Like waiting for an Ajax response. However this attribute is only available on form input elements. This is unfortunate if you are heavily using...

Read more...

jQuery Autobox Plugin

Posted on 30 October 2010

I have worked on several site designs that expect form inputs to render with a default value. Upon focus of the input the default text should clear and allow user input to stick. Sometimes the design calls for this to happen with a password field as well. Password fields are a special condition as the text is rendered as dots. You cannot dynamically change the 'type' attribute of a password input field. This is a...

Read more...

IE Button Bug

Posted on 05 September 2010

I recently encountered an annoying bug in multiple versions of IE regarding forms and button elements. I am writing about it to remind myself in the future and to hopefully save time for someone else. The bug spawned from my decision to use <button> elements over <input type="submit"> elements as the submit buttons for my forms. I chose button elements because they are generally more consistent in cross browser rendering and also allow for more...

Read more...