This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Lets require/import the HTTP module | |
const http = require('http'); | |
const util = require('util') | |
//Lets define a port we want to listen to | |
const PORT = 8080; | |
//We need a function which handles requests and send response | |
function handleRequest(request, response) { | |
response.setHeader('Access-Control-Allow-Origin', '*'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkNC(code) { | |
var L = code.length; | |
if (L < 8 || parseInt(code, 10) == 0) return false; | |
code = ('0000' + code).substr(L + 4 - 10); | |
if (parseInt(code.substr(3, 6), 10) == 0) return false; | |
var c = parseInt(code.substr(9, 1), 10); | |
var s = 0; | |
for (var i = 0; i < 9; i++) | |
s += parseInt(code.substr(i, 1), 10) * (10 - i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@midnight-blue: #2c3e50; | |
@peter-river : #3498db; | |
@belize-hole : #2980b9; | |
@turquoise : #1abc9c; | |
@emerland : #2ecc71; | |
@amethyst : #9b59b6; | |
@wetasphalt : #34495e; | |
@greensea : #16a085; | |
@nephritis : #27ae60; | |
@wisteria : #8e44ad; |