Using the node-open module you can open files or URLs in the user’s preferred application.
Continue reading “Quick Tip: Node.js Open URL in User’s Preferred Application/Browser”
Web and Mobile Development articles
Using the node-open module you can open files or URLs in the user’s preferred application.
Continue reading “Quick Tip: Node.js Open URL in User’s Preferred Application/Browser”
If you’re using Browserify to bundle assets in an Express or Connect application then you may want to consider using node-enchilada middleware to faciliate your bundling process.
Continue reading “Serve Your JavaScript Files Bundled using Browserify with Node Enchilada”
Browserify is an excellent tool that lets you use CommonJS modules right in the browser by bundling them up into a single large file. If you are well acquainted with Node and it’s way of loading modules via require('module')
and exporting them using module.exports = ...
, this is the exact pattern browserify brings to the browser. Not only can you write your own modules in this format and load/export them, but you can also use those installed via npm!
Continue reading “Browser-Side Node.js Style Modules require() and exports with Browserify”
First of all what is weighted random ? Let’s say you have a list of items and you want to pick one of them randomly. Doing this seems easy as all that’s required is to write a little function that generates a random index referring to one of the items in the list. Sometimes plain randomness is not enough, we want random results that are biased or based on some probability. This is where a simple weighted random generation algorithm can be used.
Continue reading “Weighted/Biased Random Number Generation with JavaScript based on Probability”
Just thought of making a list of -webkit
(Chrome, Safari) css properties that mostly affects mobile user experience – iOS, Android, etc.
Continue reading “List of Webkit CSS Properties for Mobiles”
Long title, but then I felt like specifying parts of what I’ll be covering in this post. Anyway, so I’ll start by a not-so-common issue that some of us have encountered, which is, how to move the input caret (sometimes referred to as the keyboard cursor) to the end of an input field or a textarea on focus.
Node Version Manager (NVM) is a neat little bash script that allows you to manage multiple versions of Node.js on the same box. A version manager really helps to test our applications under different versions of the related software.
Continue reading “Using Node Version Manager (NVM) to Manage Multiple Node.js Versions”