This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.
Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.
Generate a Certificate Authority:
This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.
Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.
Generate a Certificate Authority:
/** | |
* _Explicitly declare modifications_ to an existing object type via a fluent interface which yields a mapping function | |
* from the original data type to the type derived from the modification commands. | |
* | |
* The value over authoring a simple mapping function directly | |
* * harder to make a mistake due to the explicit nature | |
* * easier to read. | |
* | |
* This is _not_ production quality code but rather a _proof of concept_ gist for applying conditional/mapped | |
* types to mapper generation. A real-world usage might involve also generating the type-guard function |
const PLUGIN_NAME = "MutateRuntimePlugin"; | |
class MutateRuntimePlugin { | |
/** | |
* | |
* @param {FederationDashboardPluginOptions} options | |
*/ | |
constructor(options) {} | |
/** |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>join vs concat when dealing with very long lists of single-character strings</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
let cache = new Map(); | |
let pending = new Map(); | |
function fetchTextSync(url) { | |
if (cache.has(url)) { | |
return cache.get(url); | |
} | |
if (pending.has(url)) { | |
throw pending.get(url); | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>(key in object) vs. (object[key] !== void 0) vs. object.hasOwnProperty(key)</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
{ __esModule: true, | |
is: [function is(type /*: string*/, node /*: Object*/, opts /*:: ?: Object*/, skipAliasCheck /*:: ?: boolean*/) /*: boolean*/ ], | |
isType: [function isType(nodeType /*: string*/, targetType /*: string*/) /*: boolean*/ ], | |
validate: [function validate(node, key, val) ], | |
shallowEqual: [function shallowEqual(actual /*: Object*/, expected /*: Object*/) /*: boolean*/ ], | |
appendToMemberExpression: [function appendToMemberExpression(member /*: Object*/, append /*: Object*/, computed /*:: ?: boolean*/) /*: Object*/ ], | |
prependToMemberExpression: [function prependToMemberExpression(member /*: Object*/, prepend /*: Object*/) /*: Object*/ ], | |
ensureBlock: [function ensureBlock(node /*: Object*/) ], | |
clone: [function clone(node /*: Object*/) /*: Object*/ ], | |
cloneDeep: [function cloneDeep(node /*: Object*/) /*: Object*/ ], |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>String#includes vs. String#indexOf vs. RegExp</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
import xs from 'xstream' | |
import { combineCycles } from 'redux-cycle-middleware' | |
import { push } from 'react-router-redux' | |
import { API_URL } from '../constants/api' | |
// ACTION TYPES (Format: app-name/reducer/ACTION_TYPE) | |
// ======================================================= | |
const LOGIN = 'app-name/auth/LOGIN' | |
const LOGIN_SUCCESS = 'app-name/auth/LOGIN_SUCCESS' | |
const LOGIN_FAIL = 'app-name/auth/LOGIN_FAIL' |