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
machdep.cpu.max_basic: 13 | |
machdep.cpu.max_ext: 2147483656 | |
machdep.cpu.vendor: GenuineIntel | |
machdep.cpu.brand_string: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz | |
machdep.cpu.family: 6 | |
machdep.cpu.model: 58 | |
machdep.cpu.extmodel: 3 | |
machdep.cpu.extfamily: 0 | |
machdep.cpu.stepping: 9 | |
machdep.cpu.feature_bits: 18427078393948011519 |
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
//@ts-check | |
"use strict"; | |
const TOTP = require("../../app/util/totp.js"); | |
const assert = require("chai").assert; | |
describe("TOTP", function () { | |
describe("verify", function () { | |
it("works according to RFC6238 test vectors", function () { | |
// From https://www.rfc-editor.org/rfc/rfc6238.html#appendix-B |
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
// Essentially a std::vector<uint8_t>, but uses mmap+mremap to manipulate the | |
// Linux page table. Not portable. Memory is not freed when the class is | |
// destructed; use FastVector::free. | |
// In some basic benchmarks, this is not faster than realloc (with glibc), | |
// although in principle it should provide better guarantees that data movement | |
// is avoided (regardless of alloc size). | |
#include <sys/mman.h> |
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
#include <cstddef> | |
#include <cmath> | |
#ifdef __FAST_MATH__ | |
#error Compensated summation is unsafe with -ffast-math (/fp:fast) | |
#endif | |
inline static void kadd(double& sum, double& c, double y) { | |
y -= c; | |
auto t = sum + y; | |
c = (t - sum) - y; |
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
/** | |
* Jest's require() cache is reset between tests (modules are re-evaluated) | |
* for most, but not all modules. In the "not all" group are native modules, | |
* so all interactions with them must be idempotent. | |
* https://github.com/facebook/jest/issues/4413 | |
* | |
* Encountered in https://github.com/Automattic/node-canvas/issues/1310, | |
* https://github.com/Automattic/node-canvas/issues/1294, | |
* https://github.com/Automattic/node-canvas/issues/1250 | |
*/ |
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 name = "<some domain>"; | |
const AWS = require("aws-sdk"); | |
const route53 = new AWS.Route53(); | |
const DNS = require("@google-cloud/dns"); | |
const dns = new DNS({projectId: "<your project id>"}); | |
const dnsZone = dns.zone("<zone name>"); | |
const resolvers = [ // See note below -- set to the NS for your zone | |
"<dns server 1>", | |
"<dns server 2>"//, ... |
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
hoistDotArgs = function(fn) { | |
dotCalls = list() | |
findDotArgs = function(exp) { | |
if (typeof(exp) == "closure") { # entry point | |
expL = as.list(exp) | |
args = names(expL) | |
if (!("..." %in% args)) return(invisible()) # no dots to hoist | |
body = expL[[length(expL)]] | |
findDotArgs(body) |
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
/** | |
* Tool to change styles with dynamic CSS. Use instead of setting style | |
* properties on individual elements. | |
*/ | |
function Styler() { | |
this.styleEl = document.createElement("style"); | |
document.head.appendChild(this.styleEl); | |
// Map for quickly looking up an existing rule by its selector. | |
this.ruleMap = new Map(); | |
} |
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
(* Common: *) | |
ToJSON[x_] := ImportString[FromCharacterCode[x, "Unicode"], "RawJSON"](*Ignore emoji*) | |
getIssues[repo_] := getIssues[repo, "*"] | |
getIssues[repo_, milestone_] := | |
getIssues[repo, milestone] = Block[{url, head, pageCount, issues}, | |
url = URLBuild[{"https://api.github.com/repos", repo, "issues"}, | |
{"state" -> "all", | |
(*"access_token" -> "...",*) (* use for private repos, larger API quota*) | |
"sort" -> "created", |
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
// Generated .IDL file (by the OLE/COM Object Viewer) | |
// | |
// typelib filename: VWorksCPPATL.dll | |
[ | |
uuid(83ED4BB2-4E00-4349-AD9E-493801A0FC62), | |
version(1.0), | |
custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 134218331), | |
custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 1471199125), | |
custom(DE77BA65-517C-11D1-A2DA-0000F8773CE9, "Created by MIDL version 8.00.0603 at Sun Aug 14 11:25:24 2016 |
NewerOlder