brew install mongodb
mkdir -p /data/dbEnsure that user account running mongod has correct permissions for the directory:
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Electron</title> | |
| </head> | |
| <body> | |
| <script> | |
| var ipc = require('ipc'); | |
| var checkNIR = function(nir){ | |
| nir = (typeof nir === "string" ) ? nir : nir.toString(); | |
| var checkSum = parseInt(nir.substring(13), 10); | |
| var ssNbr = parseInt(nir.substring(0,13), 10); | |
| var calculateCheckSum = Math.abs((ssNbr % 97) - 97); | |
| return (checkSum == calculateCheckSum) ? true : false; | |
| } | |
| if(checkNIR("188119206408654")){ | |
| console.log("NIR Verified") |
| <?php | |
| /** | |
| * @author esuaram | |
| * Fix for PSCSX-5578 | |
| * With pull request: https://github.com/xGouley/PrestaShop/commit/d3a0483d06254fc2e20d439b855f5ea4240ca3d7 | |
| * File location: /override/classes/order/Order.php | |
| */ | |
| class Order extends OrderCore | |
| { | |
| public function getWsCurrentState() |
| 'use strict'; | |
| // simple express server | |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| app.use(express.static('public')); | |
| app.get('/', function(req, res) { | |
| res.sendfile('./public/index.html'); |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');Those suck for maintenance and they're ugly.