These are VMs running built with JavaScript/WASM allowing you to run an operating system within your browser, all client side.
This file contains 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
use futures::StreamExt; | |
use std::error::Error; | |
use tokio; | |
use tokio::macros::support::Pin; | |
use tokio::prelude::*; | |
use tokio::time::{Duration, Instant}; | |
pub fn main() -> Result<(), Box<dyn std::error::Error>> { | |
let mut multi_threaded_runtime = tokio::runtime::Builder::new() | |
.threaded_scheduler() |
This file contains 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 slugify (text, ampersand = 'and') { | |
const a = 'àáäâèéëêìíïîòóöôùúüûñçßÿỳýœæŕśńṕẃǵǹḿǘẍźḧ' | |
const b = 'aaaaeeeeiiiioooouuuuncsyyyoarsnpwgnmuxzh' | |
const p = new RegExp(a.split('').join('|'), 'g') | |
return text.toString().toLowerCase() | |
.replace(/[\s_]+/g, '-') // Replace whitespace and underscore with single hyphen | |
.replace(p, c => | |
b.charAt(a.indexOf(c))) // Replace special chars | |
.replace(/&/g, `-${ampersand}-`) // Replace ampersand with custom word |
This file contains 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
-- example reporting script which demonstrates a custom | |
-- done() function that prints results as JSON | |
done = function(summary, latency, requests) | |
io.write("\nJSON Output:\n") | |
io.write("{\n") | |
io.write(string.format("\t\"requests\": %d,\n", summary.requests)) | |
io.write(string.format("\t\"duration_in_microseconds\": %0.2f,\n", summary.duration)) | |
io.write(string.format("\t\"bytes\": %d,\n", summary.bytes)) | |
io.write(string.format("\t\"requests_per_sec\": %0.2f,\n", (summary.requests/summary.duration)*1e6)) |
This file contains 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
const Benchmark = require('benchmark') | |
const co = require('co') | |
const bluebird = require('bluebird') | |
const suite = new Benchmark.Suite | |
suite | |
.add('co generators', { | |
defer: true, | |
fn: deferred => { |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
This file contains 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
#!/usr/bin/env bash | |
set -e | |
set -u | |
if [ -f .env ]; then | |
export $(cat .env | xargs) | |
else | |
echo ".env file not found" | |
fi |
NewerOlder