A Pen by Captain Anonymous on CodePen.
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
#!/bin/bash | |
# adapted from: https://raw.githubusercontent.com/gnachman/iTerm2/master/tests/imgcat | |
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; | |
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It | |
# only accepts ESC backslash for ST. | |
function print_osc() { | |
if [[ $TERM == screen* ]] ; then | |
printf "\033Ptmux;\033\033]" |
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 promiseAllTimeout(promises, timeout, resolvePartial=true) { | |
return new Promise(function(resolve, reject) { | |
let results = [], | |
finished = 0, | |
numPromises = promises.length; | |
let onFinish = function() { | |
if (finished < numPromises) { | |
if (resolvePartial) { | |
(resolve)(results); | |
} else { |
I hereby claim:
- I am perry-mitchell on github.
- I am perrymitchell (https://keybase.io/perrymitchell) on keybase.
- I have a public key ASAT5ktEnnlyXr6Bf22lUsboAkqfS-jZuaMMvmdrh7qpXgo
To claim this, I am signing this object:
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"); |
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
"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
Show hidden 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
{ | |
"env": { | |
"testing": { | |
"presets": [ | |
"es2015" | |
] | |
} | |
}, | |
"presets": [ | |
["es2015", { "modules": false }] |
OlderNewer