Using Adobe Edge Inspect you can inspect your webpages (like you do in chrome dev tools) across various remote devices (mobiles, tablets, etc.). You basically connect multiple iOS or Android devices to your computer wirelessly (this happens via adobe’s servers). Then all you do is browser in your Chrome and those devices will stay in sync, i.e., open/refresh the webpage that you’re viewing in chrome. You can then fire up an inspecting tool (in your computer) to inspect html, css and do a lot more (like dev tools) in those devices. The inspection is done via weinre.
Continue reading “Using Adobe Edge Inspect for Cross-Device Web Page Debugging and Synchronized Browsing”
Author: Rishabh
MongoDB Pretty Print Result Objects in Mongo Interactive Shell
This is just a mongodb quick tip in regards to printing the result sets with proper formatting in the mongo interactive shell.
Continue reading “MongoDB Pretty Print Result Objects in Mongo Interactive Shell”
Quick Tip: Node.js Open URL in User’s Preferred Application/Browser
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”
Fast Automatic Browserify Bundling with Beefy
If you’re a browserify user, then beefy might help you bundle your JavaScript file automatically. It is a command line tool that runs a local node server which accepts a path to the JS file (with all your require() calls) and serves the bundled asset via browserify.
Continue reading “Fast Automatic Browserify Bundling with Beefy”
Browser-Side Node.js Style Modules require() and exports with Browserify
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”
List of Webkit CSS Properties for Mobiles
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”
Weighted/Biased Random Number Generation with JavaScript based on Probability

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”