Skip to content

Instantly share code, notes, and snippets.

Aaron Gray AaronNGray

Block or report user

Report or block AaronNGray

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AaronNGray
AaronNGray / npm_lazy.md
Created Oct 6, 2019
How to install npm_lazy as a Mac OS X Launcher from the command line.
View npm_lazy.md

How to install npm_lazy as a Mac OS X Launcher from the command line.

NOT TESTED YET

Install npm_lazy globally :-

npm install -g npm_lazy

Create the configuration file :-

View verdaccio.md

How to install verdaccio as a Mac OS X Launcher from the command line.

NOT TESTED YET

Install verdaccio globally :-

npm install -g verdaccio
View npm_lazy.sh
# /Users/user/Scripts/npm_lazy.sh
#!/bin/sh
npm_lazy --config --config ~\npm_lazy.config.js
View org.verdaccio.launcher.plist
# ~/Library/LaunchAgents/org.verdaccio.launcher.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.verdaccio.launcher</string>
<key>Program</key>
<string>/Users/user/Scripts/verdaccio.sh</string>
<key>RunAtLoad</key>
View verdaccio.md

How to install verdaccio as a Windows Service from the command line.

Download NSSM and install it in a directory on the path.

Install npm_lazy :-

npm install -g verdaccio
View npm_lazy.md

How to install npm_lazy as a Windows Service from the command line.

Download NSSM and install it in a directory on the path.

Install npm_lazy and create a configuration file :-

npm install -g npm_lazy
npm_lazy --init > "%userprofile%/npm_lazy.config.js"
View texlive.js
FireFox :-
data:application/pdf;charset=binary;base64,JVBERi0xLjQKJdDUxdgKNCAwIG9iaiA8PAovTGVuZ3RoIDExOTcgICAgICAKL0ZpbHRlciAvRmxhdGVEZWNvZGUKPj4Kc3RyZWFtCnjanVZNb9tGEL3rV2xPpYByvV/cDxQ9NKkDpHCABNahQJwDLa2sbUhRIak46aV/vbOcpUzZtFv0InFnhzNv3ryd5avV4uIN10QwqrUoyGpLhFaUs4JoVlAnLFltyMdstfy0+p1w8JKK5IoqlTYuTxtckIn9jyp8XQqdefpnF10giyFcUam0iFlybalzkuSyoMoJfOl168veb5a5hDdvl8Jk3/H5XbmPq6OvcH29jsvd30tlXdZUVdjfDTikoNw6kgtLmVIY9Nofel9H/9tlDr++xRjqp/hvMsGWPOPuASSnrigQJAde+FCxAqOZcqFpwQC+oIWRUyqinZOJGZkwyEQuXZGF4V9lJS7XTX0I1QALVtumxd1+59GSuNcRin4mozjLiO/1A4EHLLrzfR9ZGkIf2uauLeuU/kQ6LI7dSGXOnaECSsl5bKvG0O+av0JVlT/GCozMLutu3Qbgd4/r16kUuswLU2RvezQ3N4xL36aXUva6vK08Wja++9w3h7QN7TjeVqHbjVBYwlAghi3gPbZ+iKazcr/BB/8NYHSJazRty3WoQh9GX+TWmKw89k1dQqLECZjqputTxC5xtu7Te80WfYBR+4TRKcLE0oBJSf5QWFwcTlWB8lRhsrBfV8fNgEBJke1j9OOZUtMef4i4bpuuy1u/9a3fr8dYNusjm92zYKRyGTRB3UXiovALUEF553GnKofCYubm2A/bRXYbgB9AHJt12IX0WjHGs9mA9IgnEePUTetj65nA1oOpOx6Qr6Yd2ATTFR41IYihzoDC4KRJDSfXGFCxEUnFv86dSEULa+IZOLk9OY1q/jSq8WwM4pbGUaPtOVP3u3CqRojsPj6XEbQACbfhLuyjZ
View retry.js
// code from https://tech.mybuilder.com/handling-retries-and-back-off-attempts-with-javascript-promises/
const pause = (duration) => new Promise(res => setTimeout(res, duration));
const retry = (self, fn, args, retries, delay = 500, factor = 2) =>
fn.apply(self, args).catch(err => retries > 1
? pause(delay).then(() => retry(self, fn, args, retries - 1, delay * factor, factor))
: Promise.reject(err));
module.exports = retry;
@AaronNGray
AaronNGray / Features.js.txt
Last active Oct 3, 2018
General patterns for creating windows feature Polyfills
View Features.js.txt
"use strict";
(scope => {
...code...
// exports
scope.X = X;
scope.Y = Y;
})(window.Feature = (window.Feature || {}));
View EdgeError.html
<!DOCTYPE html>
<html>
<head>
<!-- Copyright (c) 2018 Aaron Nathaniel Gray -->
<script>
document.addEventListener('WebComponentsReady', function() {
console.log("WebComponentsReady", Math.round(performance.now()));
document.body.appendChild(
document.createTextNode("WebComponentsReady: " + Math.round(performance.now()) + "ms")
);
You can’t perform that action at this time.