This file contains hidden or 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
| Current Problem: | |
| "This certificate has an invalid digital signature." | |
| The server certificate is a proper child of the root certificate, and the root certificate is not showing any errors. | |
| The server certificate is reporting an invalid signature. | |
| Certificate Creation: | |
| openssl genpkey -algorithm RSA -out share-file-ca.key -pkeyopt rsa_keygen_bits:4096 | |
| openssl req -x509 -new -nodes -key share-file-ca.key -sha256 -days 16384 -out share-file-ca.crt -subj "/CN=share-file-ca/O=share-file" | |
| openssl req -new -nodes -out share-file.csr -newkey rsa:4096 -keyout share-file.key -subj "/CN=share-file/O=share-file" |
This file contains hidden or 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
| problem - Ubuntu: | |
| Cert does not work at all. When connecting to localhost the browser throws the Privacy Error screen with Chrome error NET::ERR_CERT_AUTHORITY_INVALID | |
| --- | |
| certificate create steps: | |
| openssl genpkey -algorithm RSA -out share-file-ca.key | |
| openssl req -x509 -key share-file-ca.key -days 16384 -out share-file-ca.crt -subj "/CN=share-file-ca/O=share-file" | |
| openssl genpkey -algorithm RSA -out share-file.key | |
| openssl req -new -key share-file.key -out share-file.csr -subj "/CN=share-file/O=share-file" |
This file contains hidden or 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
| problem - Windows: | |
| Cert does not work unless both the root and signed certs are added to the Windows trust store. | |
| --- | |
| certificate create steps: | |
| openssl genpkey -algorithm RSA -out share-file-ca.key | |
| openssl req -x509 -key share-file-ca.key -days 16384 -out share-file-ca.crt -subj "/CN=share-file-ca/O=share-file" | |
| openssl genpkey -algorithm RSA -out share-file.key | |
| openssl req -new -key share-file.key -out share-file.csr -subj "/CN=share-file/O=share-file" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) | |
| }; | |
| } |