- Install from https://github.com/denji/homebrew-nginx
brew tap denji/nginx
brew install nginx-full --with-webdav
Output:
brew tap denji/nginx
brew install nginx-full --with-webdav
Output:
"use strict"; | |
const Http = require("http"); | |
class SimpleServer { | |
constructor({ port, name }) { | |
this._config = { port, name }; | |
this._routes = {}; | |
} |
<html> | |
<head> | |
<script> | |
var baseUrl = "http://localhost:3000"; | |
var launchedWindow; | |
function load() { | |
// window.location = "${baseUrl}"; | |
console.log("launching") |
{ | |
"name": "x2", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", |
function posToLine(template, pos) { | |
const lines = template.split("\n"); | |
let run = 0; | |
let x; | |
for (x = 0; x < lines.length; x++) { | |
const line = lines[x]; | |
if (run + line.length < pos) { | |
run += line.length + 1; | |
} else { |
// Place your settings in this file to overwrite default and user settings. | |
{ | |
"editor.tabSize": 2, | |
"editor.wordWrapColumn": 200, | |
"editor.wordWrap": "wordWrapColumn", | |
"editor.detectIndentation": false, | |
"editor.formatOnSave": false, | |
"typescript.format.enable": false, | |
"javascript.format.enable": true, | |
"json.format.enable": false, |
"use strict"; | |
const Tar = require("tar"); | |
const Path = require("path"); | |
const Fs = require("fs"); | |
const Promise = require("bluebird"); | |
const logger = require("./logger"); | |
const defer = require("./util/defer"); | |
const { fork } = require("child_process"); |
class DirMap { | |
constructor() { | |
this._map = { _: {} }; | |
} | |
set(dir, data) { | |
const splits = dir.split(path.sep); | |
let map = this._map; | |
let i; | |
for (i = 0; i < splits.length; i++) { |
new Promise( (resolve, reject ) => { })
Promise.resolve(<resolved_value>)
Where <resolved_value>
can be any value, even another promise.Promise.reject(<error_value>)
promise.then( resolved_value => return <x> )
Where <x>
either becomes the new resolved_value
for next .then
or if it's a promise, it becomes the new promise in the chain. Remember to return your promise!FILES=".babelrc .eslintignore .eslintrc .gitignore .npmignore .travis.yml LICENSE README.md gulpfile.js lib package.json test" | |
TARGET=packages/electrode-react-webapp | |
git filter-branch --tree-filter "for f in $FILES; do if [ -e \$f ]; then mkdir -p $TARGET; mv \$f $TARGET; fi; done" |