Skip to content

Instantly share code, notes, and snippets.

@coverboy
coverboy / app.js
Created October 21, 2018 04:51 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
'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');
@coverboy
coverboy / README.md
Created August 3, 2018 01:02 — forked from MarkTiedemann/README.md
An Easier Way to Enforce Required Parameters in ES6

An Easier Way to Enforce Required Parameters in ES6

Expands on Handling required parameters in ECMAScript 6 by Axel Rauschmayer.

The idea (which is credited to Allen Wirfs-Brock) is, in essence, to use default parameter values to call a function which throws an Error if the parameter is missing:

const throwIfMissing () => { throw new Error('Missing parameter') }
@coverboy
coverboy / index.html
Last active September 16, 2018 14:51
html5 skeleton template
<!doctype html>
<html lang="en">
<!--한글은 lang="ko" Learn more : https://www.w3.org/International/questions/qa-html-language-declarations-->
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">