打造闭环:
var a = {}
var b = {}
a.b = b
b.a = a
底层逻辑:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>PBKDF2 Test</title> | |
<style> | |
body, input { | |
font-family: monospace; | |
} |
(function() { | |
'use strict' | |
let s = fetch('/') | |
console.time('t0') | |
for (let i = 0; i < 1e9; i++) { | |
if (true) {} | |
} | |
console.timeEnd('t0') |
(function() { | |
'use strict' | |
let s | |
console.time('t0') | |
for (let i = 0; i < 1e7; i++) { | |
} | |
console.timeEnd('t0') | |
console.time('t1') |
打造闭环:
var a = {}
var b = {}
a.b = b
b.a = a
底层逻辑:
# see https://github.com/EtherDream/freecdn/blob/master/examples/free-host/npm-upload.sh | |
IFS=$'\n' | |
if [[ "$NPM_PKG" == "" ]]; then | |
echo "\$NPM_PKG is not specified" | |
exit | |
fi | |
if [[ "$*" == "" ]]; then | |
echo "file list empty" |
(function() { | |
'use strict' | |
async function pending() { | |
return 11 | |
} | |
function mayPending() { | |
if (Math.random() < 0.001) { | |
return pending() |
OPENRESTY_VER=1.17.8.2 | |
ZLIB_VER=1.2.11 | |
PCRE_VER=8.44 | |
OPENSSL_VER=1.1.1h | |
DIR=$(mktemp -d) | |
echo $DIR | |
cd $DIR | |
git clone https://github.com/google/ngx_brotli.git --recurse-submodules |
function formatTime(date) { | |
var d = new Date(date - 60000 * date.getTimezoneOffset()); | |
var s = d.toISOString(); | |
return s.substr(0, 10) + ' ' + s.substr(11, 8); | |
} | |
formatTime( new Date() ); // "2018-03-15 16:52:34" |
function formatTime(date) { | |
var d = new Date(date - 60000 * date.getTimezoneOffset()); | |
var s = d.toISOString(); | |
return s.substr(0, 10) + ' ' + s.substr(11, 18); | |
} | |
formatTime( new Date() ); // "2018-03-15 16:52:34.969Z" |
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@function is_prime($num, $sqrt) { | |
@for $i from 3 through $sqrt { | |
@if $num % $i == 0 { | |
@return false; | |
} |