Just some notes and references for myself.
- In bash, you can access your
C:\
drive via/mnt/c/
~
=C:\Users\MLM\AppData\Local\lxss\home\mlm
and is different from your Windows user directoryC:\Users\MLM
var HashMap = function(cell_size) { | |
this.cell_size = cell_size; | |
this.grid = []; | |
} | |
HashMap.prototype._key = function(vec) { | |
var cellsize = this.cell_size; | |
return Math.floor(vec.x/cellsize) * cellsize + ' ' + | |
Math.floor(vec.y/cellsize) * cellsize; | |
} |
function basic_auth (req, res, next) { | |
if (req.headers.authorization && req.headers.authorization.search('Basic ') === 0) { | |
// fetch login and password | |
if (new Buffer(req.headers.authorization.split(' ')[1], 'base64').toString() == 'usernamehere123:passwordhere123') { | |
next(); | |
return; | |
} | |
} | |
console.log('Unable to authenticate user'); | |
console.log(req.headers.authorization); |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
This is a succinct step-by-step guide to setting up a debugging environment for Node.js C++ Addons.
It is based on this great article which goes into a lot more detail.
NOTE: You'll need an archive utility that can handle gzip
and tar
extensions. I used 7-Zip
#include <vector> | |
#include <string> | |
#include <cmath> | |
#include <iostream> | |
#include <sndfile.h> | |
#ifdef WITH_RLIMIT | |
#include <sys/resource.h> | |
#endif |