Set up an HTTPS enabled website with NGINX and LetsEncrypt.
sudo apt-get update
/etc/nginx/sites-available/default
sudo letsencrypt certonly --standalone -n -m [email protected] -d sinopia.exploreplanet3.com --agree-tos
A RAW HISTORY DUMP... SORRY
| 'use strict'; | |
| class Time | |
| { | |
| constructor( tz ) | |
| { | |
| this.tz = tz; | |
| this.tzOffset = 3600000 * this.tz || 0; | |
| this.days = [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]; | |
| this.months = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]; |
| #!/bin/bash | |
| ######### | |
| # | |
| # Once downloaded, run: `chmod 775 nodeupdate` and double click | |
| # | |
| ######### | |
| platform='unknown' | |
| case "$OSTYPE" in |
| class ReadStream | |
| { | |
| constructor( obj, opt = {} ) | |
| { | |
| if( Buffer.isBuffer( obj ) || obj === ''+obj ) | |
| stream.Readable.call( this, { | |
| highWaterMark: opt.highWaterMark, encoding: opt.encoding | |
| } ); | |
| else | |
| stream.Readable.call( this, { objectMode: true } ); |
| /** | |
| * Desc: Checks if a deep property exists | |
| * Exp: checkNested( { a: { b: { c: "d" } } } ); | |
| * Returns: Boolean | |
| */ | |
| function checkNested( obj ) { | |
| const args = Array.prototype.slice.call( arguments, 1 ); | |
| for( let i = 0; i < args.length; i++ ) { | |
| if( !obj || !obj.hasOwnProperty( args[ i ] ) ) | |
| return false; |
Set up an HTTPS enabled website with NGINX and LetsEncrypt.
sudo apt-get update
/etc/nginx/sites-available/default
sudo letsencrypt certonly --standalone -n -m [email protected] -d sinopia.exploreplanet3.com --agree-tos
A RAW HISTORY DUMP... SORRY
| 'use strict'; | |
| // only works for binary numbers 0-15 to help with understanding binary | |
| function coerceToBinary( n ) { | |
| n = n === +n ? ( n >>> 0 ).toString( 2 ) : n; | |
| if( n < 0 ) | |
| return coerceToBinary( n ); | |
| 'use strict'; | |
| function jsEval( jsString ) | |
| { | |
| ( ( () => {} ).constructor( jsString ) )(); | |
| } | |
| jsEval( "console.log( 'hello world' );" ); |
| # Usage: `s3publish bucket-name default-profile` | |
| # BUCKET to upload to | |
| BUCKET=s3://$1 | |
| # Optional profile | |
| PROFILE=$2 | |
| # specify folders if thou so choose | |
| ENV=/ |
server {
listen 80;
listen [::]:80;
server_name *.server1.com;
server_name *.server2.com;
return 301 https://$server_name$request_uri;
}
server {