sudo apt update -y
sudo apt upgrade -y
sudo apt install -y vim
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
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
sudo yum update -y | |
sudo yum upgrade -y | |
sudo yum-config-manager --enable epel | |
sudo yum install git vim -y | |
sudo yum install python3-pip -y | |
sudo yum install docker -y | |
sudo usermod -a -G docker ec2-user | |
id ec2-user | |
newgrp docker | |
pip3 install --user docker-compose |
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
sudo apt update -y | |
sudo apt upgrade -y | |
sudo apt install vim wget jq -y | |
# set DNS | |
# sudo vim /etc/resolv.conf | |
# set static IP (requires reboot) | |
# sudo vim /etc/dhcpcd.conf | |
# if using Argon EON case |
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'; | |
/** | |
* Web Mercator Math | |
* @class | |
* @description | |
* Web Mercator Math | |
* A class collection of mathematical equations for calculating Web Mercator tiles | |
* | |
* 0:0: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
node -e "const x=require(process.cwd()+'/package.json');console.log('npm i -D',Object.keys(x.devDependencies).join(' '));console.log('npm i -S',Object.keys(x.dependencies).join(' '));" |
SSH into Ubuntu-based instance
sudo apt-get update -y
sudo apt-get upgrade -y
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm i -g pm2
KEY
and CRT
from PFX
:
openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]
openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]
Encrypted KEY
to decrypted KEY
: openssl rsa -in [keyfile-encrypted.key] -out [keyfile-decrypted.key]
PEM from key: openssl rsa -in [keyfile-encrypted.key] -outform PEM -out [keyfile-encrypted-pem.key]
Manual super: Alternative Design where subclass constructors do not automatically call superclass constructors
This Gist presents a new design of class-based object construction in ES6 that does not require use of the two-phase @@create protocol.
One of the characteristics of this proposal is that subclass constructors must explicitly super invoke their superclass's constructor if they wish to use the base class' object allocation and initialization logic.
An alternative version of this design automatically invokes the base constructor in most situations.
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'; | |
/** | |
* @typedef {number} milliseconds | |
* @description | |
* A number assumed to be in milliseconds.<br/> | |
* Number is likely to be calculated against a Unix Epoch based timestamp or milliseconds since Jan 01 1970.<br/> | |
* When multiplied by <code>1e-3</code>, number should convert to seconds | |
*/ |
NewerOlder