Shell command execution in nodejs

NodeJS, Web Development, 2016-03-19 23:34:26 UTC
Sometimes, we need a function that doesn't exist in nodejs. Or sometimes we know other function better to do 'this' job rather than in nodejs function. So, for this we need to execute some command via shell command. And for me, here is how to run shell command; function run_cmd(cmd, args,
Share:     

An easy way using webpack

Javascript, Utilities, Web Development, 2016-01-14 11:07:36 UTC
1. Install webpack  $ npm install webpack -g   2. Create index.html <html>     <head>         <meta charset="utf-8">     </head>     <body>         <script type="text/javascript"
Share:     

How to know the browser tab is active or not

Javascript, Web Development, 2016-01-13 12:04:54 UTC
Today I am dealing with case when the tab is active, music is playing and if not music is pause.  To solve this problem, I need an even listener. Here is the code; var hidden, visibilityChange; if (typeof document.hidden !== "undefined") { hidden = "hidden"; visibilityChange = "vis
Share:     

Rails subdomain and namespace route

Ruby on Rails, Web Development, 2015-10-24 03:44:07 UTC
Currently, I am creating an API for one of my application. Instead of using a URL like https://domain.com/api/v1/path_names, I choose https://api.domain.com/v1/path_names. And today, I want to share my experience with you. The first thing that needs to do is to group all the controlle
Share: