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 fs = require("fs") | |
var ssl_options = { | |
key: fs.readFileSync('privatekey.pem'), | |
cert: fs.readFileSync('certificate.pem') | |
}; | |
var port = process.env.PORT || 3000; | |
var express = require('express'); | |
var ejs = require('ejs'); | |
var passport = require('passport') |
node -e "console.log(require('crypto').randomBytes(256).toString('base64'));" |
var path = require('path'); | |
var webpack = require('webpack'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
module.exports = { | |
devtool: 'inline-source-map', | |
entry: [ | |
'webpack-hot-middleware/client', | |
'./src/index' | |
], |
var webpack = require("webpack"); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
var lessLoader = ExtractTextPlugin.extract( | |
"css?sourceMap!less?sourceMap" | |
); | |
module.exports = { | |
cache: true, | |
entry: { bundle: "./master/client/index.jsx" }, |
// Faster solution for: | |
// http://www.boyter.org/2017/03/golang-solution-faster-equivalent-java-solution/ | |
// With threading. | |
// g++ -std=c++11 -Wall -Wextra -O3 -pthread | |
// On my computer (i5-6600K 3.50 GHz 4 cores), takes about ~220 ms after the CPU | |
// has warmed up, or ~110 ms if the CPU is cold (due to Turbo Boost). | |
// How it works: Start by generating a list of losing states -- states where the | |
// game can end in one turn. Generate a new list of states by running the game |
import webpack from 'webpack'; | |
import path from 'path'; | |
import nodeExternals from 'webpack-node-externals'; | |
export default { | |
devtool: "cheap-module-eval-source-map", | |
entry: [ | |
//code order here is critical | |
"eventsource-polyfill", //for hot reloading in IE | |
"webpack-hot-middleware/client?reload=true", //reloads page if HMR fails |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.