type: PIN
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
type: PIN
Consumer key: IQKbtAYlXLripLGPWd0HUA
| const http = require('http'); | |
| const port = 5000; | |
| const fetch = require('node-fetch'); | |
| const requestHandler = (request, response) => { | |
| fetch('http://localhost:3000/').then(r => r.text()).then(text => { | |
| // console.log(text); | |
| response.end(text); | |
| }); | |
| } |
| function stats(arr) { | |
| arr = arr.slice().sort(); | |
| var n = arr.length; | |
| var sum = arr.reduce((acc, val) => acc + val, 0); | |
| var prod = arr.reduce((acc, val) => acc * val, 1); | |
| var amean = sum / n; | |
| var gmean = Math.pow(prod, 1 / n); | |
| var median = n % 2 === 0 ? (arr[n / 2 - 1] + arr[n / 2]) / 2 : arr[(n - 1) / 2]; | |
| var variance = 0; | |
| var stddev = 0; |
There are two main modes to run the Let's Encrypt client (called Certbot):
Webroot is better because it doesn't need to replace Nginx (to bind to port 80).
In the following, we're setting up mydomain.com.
HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.
| <!doctype html> | |
| <html> | |
| <head> | |
| <script> | |
| domvm = (function() { "use strict"; | |
| var doc = document; | |
| var emptyObj = {}; | |
| var isArr = Array.isArray; | |
| function VNode() {} |
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="https://cdn.rawgit.com/leeoniya/domvm/3.x-dev/dist/nano/domvm.nano.js"></script> | |
| </head> | |
| <body> | |
| <script> | |
| // http://imgur.com/a/YATqh | |
| // https://cdn.rawgit.com/leeoniya/6149d983cd128ca6ac7c06e9dd3bd80f/raw/fe86cef4cc97aad1b89ef685643afa8590763a66/domvm-memleak.html |
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="https://cdn.rawgit.com/leeoniya/domvm/3.x-dev/dist/nano/domvm.nano.js"></script> | |
| </head> | |
| <body> | |
| <script> | |
| // http://imgur.com/a/YATqh | |
| var el = domvm.defineElement; |
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="https://rawgit.com/leeoniya/domvm/3.x-dev/dist/pico/domvm.pico.min.js"></script> | |
| </head> | |
| <body> | |
| <style> | |
| h1 { | |
| font-size: 4em; | |
| } |
| // Run the function as soon as it's called, but prevent further calls during `delay` ms | |
| // Example: function.throttle(200) will only run function() once every 200 ms. | |
| // Useful, for example, to avoid constant processing while typing in a live search box. | |
| Function.prototype.throttle = function(delay) { | |
| var fn = this | |
| return function() { | |
| var now = (new Date).getTime() | |
| if (!fn.lastExecuted || fn.lastExecuted + delay < now) { | |
| fn.lastExecuted = now | |
| fn.apply(fn, arguments) |
| <!doctype html> | |
| <html> | |
| <head></head> | |
| <body> | |
| <ul id='cycleResults'></ul> | |
| <div id="result"></div> | |
| <br> | |
| <button id="btn">Run Tests</button> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.2/lodash.min.js"></script> |