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
# | |
# OpenSSL example configuration file. | |
# This is mostly being used for generation of certificate requests. | |
# | |
# This definition stops the following lines choking if HOME isn't | |
# defined. | |
HOME = . | |
RANDFILE = $ENV::HOME/.rnd |
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
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"ecmaVersion": 11, |
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 myFunction () { | |
const modal = document.getElementById("monthModal"), | |
inputElement = document.getElementById("months"), | |
outputElement = document.getElementById("monthModal-close"), | |
modalSave = document.getElementById("monthModal-save"), | |
methods = { | |
open: function (event) { | |
event.target.style.display = "block"; | |
}, | |
close: function (event) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>loops</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> |
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
var parser = new DOMParser(), | |
xml=parser.parseFromString(`<xsl:stylesheet | |
version = "1.0" | |
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" | |
xmlns:date = "http://exslt.org/dates-and-times" | |
xmlns:exsl = "http://exslt.org/common" | |
xmlns:str = "http://exslt.org/strings" | |
extension-element-prefixes = "date exsl"> | |
<xsl:output | |
version = "1.0" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>dom vs queryselector #jsbench #jsperf</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> |
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
unmask = function terminal_commands_websocket_unmask(socket:socketClient, data:Buffer):Uint8Array { | |
// reference - https://cookie.engineer/weblog/articles/implementers-guide-to-websockets.html | |
if (socket.fragment === null) { | |
socket.fragment = { | |
opcode: 0x00, | |
payload: Buffer.alloc(0) | |
}; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Untitled benchmark</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> |
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
Connection-specific DNS Suffix . : prettydiff | |
IPv6 Address. . . . . . . . . . . : 2600:1700:1220:76c9:f982:507a:283b:3df9 | |
Temporary IPv6 Address. . . . . . : 2600:1700:1220:76c9:c8aa:b730:bad4:ece8 | |
Link-local IPv6 Address . . . . . : fe80::f982:507a:283b:3df9%14 | |
IPv4 Address. . . . . . . . . . . : 192.168.0.161 | |
Subnet Mask . . . . . . . . . . . : 255.255.255.0 | |
Default Gateway . . . . . . . . . : fe80::76da:daff:fead:ba8a%14 | |
192.168.0.23 | |
Ethernet adapter Ethernet 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
security = function dom_load_security():void { | |
const scripts:HTMLCollectionOf<HTMLScriptElement> = document.getElementsByTagName("script"), | |
exclusions:string[] = [ | |
"", //put relative addresses for your authorized scripts here | |
], | |
len:number = scripts.length, | |
exlen:number = exclusions.length; | |
let a:number = 0, | |
b:number = 0, | |
src:string = ""; |