documentation.js - http://documentation.js.org/
example:
- https://www.mapbox.com/mapbox-gl-js/api/
- http://documentation.js.org/html-example/
- https://github.com/documentationjs/documentation/blob/master/docs/NODE_API.md
| // :: (String, String) => String | |
| const spawn = require('child_process').spawnSync; | |
| // :: String => [String] | |
| const getRules = raw => raw | |
| .split('\n') | |
| .map(line => line.trim()) | |
| .filter(line => !!line) | |
| .filter(line => line[0] !== '/' && line[0] !== '✖') | |
| .map(line => line.match(/[a-z-]+$/)[0]); |
| /** | |
| * Wrap gulp streams into fail-safe function for better error reporting | |
| * Usage: | |
| * gulp.task('less', wrapPipe(function(success, error) { | |
| * return gulp.src('less/*.less') | |
| * .pipe(less().on('error', error)) | |
| * .pipe(gulp.dest('app/css')); | |
| * })); | |
| */ |
| If you're using Angular 1.2+, jQuery 2.1+, jQuery UI 1.x+ together, you can easily get a weird error like this: | |
| TypeError: undefined is not a function | |
| at replaceWith (http://myapp.com/app/bower_components/angular/angular.js:7289:26) | |
| at applyDirectivesToNode (http://myapp.com/app/bower_components/angular/angular.js:6518:13) | |
| at compileNodes (http://myapp.com/app/bower_components/angular/angular.js:6167:15) | |
| at compileNodes (http://myapp.com/app/bower_components/angular/angular.js:6179:15) | |
| at compile (http://myapp.com/app/bower_components/angular/angular.js:6107:15) | |
| at http://myapp.com/app/bower_components/angular/angular.js:1506:11 | |
| at Scope.$eval (http://myapp.com/app/bower_components/angular/angular.js:12903:28) |
A timeline of the last four years of detecting good old window.localStorage.
October 2009: 5059daa
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf to /usr/local/etc/nginx/default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-availablehomebrew.mxcl.nginx.plist to /Library/LaunchDaemons/| /* | |
| * L.TileLayer is used for standard xyz-numbered tile layers. | |
| */ | |
| L.Google = L.Class.extend({ | |
| includes: L.Mixin.Events, | |
| options: { | |
| minZoom: 0, | |
| maxZoom: 18, | |
| tileSize: 256, |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>tableToExcel Demo</title> | |
| <script src="tableToExcel.js"></script> | |
| </head> | |
| <body> | |
| <h1>tableToExcel Demo</h1> | |
| <p>Exporting the W3C Example Table</p> |
| function CroppedImage(image,sx,sy,sw,sh){ | |
| this.image = image; | |
| this.sx = sx; | |
| this.sy = sy; | |
| this.sw = sw; | |
| this.sh = sh; | |
| } | |
| CroppedImage.prototype.draw = function(context,x,y){ | |
| context.drawImage(this.image, this.sx, this.sy, this.sw, this.sh, x, y, this.sw, this.sh) |