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
window.__nightmare = {}; | |
__nightmare.ipc = require('electron').ipcRenderer; | |
__nightmare.sliced = require('sliced'); | |
// Listen for error events | |
window.addEventListener('error', function(e) { | |
__nightmare.ipc.send('page', 'error', e.message, e.error.stack); | |
}); | |
(function(){ |
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
(function () { | |
const CLICK_ALLOWANCE = 5000; // ms | |
const KEYCODE_F5 = 116; | |
const KEYCODE_LETTER_R = 82; | |
const watchedElements = []; | |
let allowanceTimer = null; | |
function arr(nodelist) { |
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
/** | |
* Find common parent node | |
*/ | |
export function findCommonParent(...nodes) { | |
let nodeParents = nodes.map(node => findParents(node)), | |
firstNodeParents = nodeParents[0], | |
topParent = firstNodeParents[0]; | |
if (nodeParents.some(parents => parents.indexOf(topParent) !== 0)) { | |
// no common parent |
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
root = true | |
[*] | |
indent_style = space | |
end_of_line = lf | |
indent_size = 4 | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
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
Show hidden characters
{ | |
"env": { | |
"testing": { | |
"presets": [ | |
"es2015" | |
] | |
} | |
}, | |
"presets": [ | |
["es2015", { "modules": false }] |
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
{ | |
"presets": "es2015" | |
} |
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
{ | |
"presets": "es2015" | |
} |
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
"use strict"; | |
const VALID_SEMVER = /^(\d+\.\d+\.\d+)(-[a-z1-9][a-z0-9]*(?:\.[a-z0-9]+)*)*(\+[a-z0-9]+(?:\.[a-z0-9]+)*)*$/i | |
let lib = module.exports = { | |
splitVersion: function(ver) { | |
let [, | |
version, | |
prerelease, |
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
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks | |
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', |
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
// To use this, you will need to `npm install iocane`! | |
const crypto = require("crypto"); | |
let aliceECDH = crypto.createECDH("secp256k1"); | |
aliceECDH.generateKeys(); | |
let alicePublicKey = aliceECDH.getPublicKey(null, "compressed"), | |
alicePrivateKey = aliceECDH.getPrivateKey(null, "compressed"); |