Skip to content

Instantly share code, notes, and snippets.

View wardbell's full-sized avatar

Ward Bell wardbell

View GitHub Profile
@wardbell
wardbell / NodeServerTooSiimple
Created November 12, 2014 16:22
Simplest Node Server In The Universe
var http = require('http');
http.createServer(function (req, res) {
console.log('Got a request: '+req.method+' '+req.url);
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
})
.listen(1337, 'localhost'); // 127.0.0.1
console.log('Server running at http://localhost:1337/');
@wardbell
wardbell / minMocha.html
Last active January 19, 2021 12:23
Minimal mocha/chai in browser
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<title>Mocha/Chai Basic Tests</title>
<style>
body {
font: 18px/1.5 "Helvetica Neue", Helvetica, sans-serif;
@wardbell
wardbell / index.html
Last active August 29, 2015 14:18
aurelia-breeze-adapter: splice vs. null
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
<title >Observer Fun</title>
</head>
<body>
<h1>Ta Da!</h1>
@wardbell
wardbell / index.html
Last active January 27, 2017 09:59
My RxJS games
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="RxJS Fun">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin RxJS Play</title>
<script src="https://unpkg.com/[email protected]/bundles/Rx.js"></script>
</head>
<body>
// Npm install Angular libraries into application root folder (APP_ROOT_PATH),
// either release or current build packages
// Examples:
// gulp install-example-angular --build // use current build packages
// gulp install-example-angular --build=2.0.0-b43f954 // use tagged packages
// gulp install-example-angular // restore release packages
//
// Find the tags here: https://github.com/angular/core-builds/releases
//
// Originally from https://github.com/angular/angular.io/blob/v2/gulpfile.js#L490