Skip to content

Instantly share code, notes, and snippets.

View iSkore's full-sized avatar
Vue + Vuetify + AWS Amplify = Power Overwhelming

Nick Soggin iSkore

Vue + Vuetify + AWS Amplify = Power Overwhelming
View GitHub Profile
@iSkore
iSkore / util.js
Last active January 28, 2018 13:08
The Last Kitchen-Sink File Ever.
'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
*/
@iSkore
iSkore / example-config.md
Last active January 14, 2018 15:46
Adding NGINX HTTP to HTTPS rollover
server {
    listen 80;
    listen [::]:80;
    server_name *.server1.com;
    server_name *.server2.com;
    return 301 https://$server_name$request_uri;
}

server {
@iSkore
iSkore / 0Option2ConstructorSummary.md
Created November 10, 2017 12:17 — forked from allenwb/0Option2ConstructorSummary.md
New ES6 constructor features and semantics: Alternative 2 manual super in derived classes

New ES6 Constructor Semantics and Usage Examples

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.

@iSkore
iSkore / c-test.c
Last active November 8, 2017 12:58
#include <stdio.h>
int main(int argc, char *argv[]) {
int w = 0;
for( int x = 0; x < 100; x++ ) {
for( int y = 0; y < 100; y++ ) {
for( int z = 0; z < 100; z++ ) {
w += z;
}
@iSkore
iSkore / ec2setup.md
Last active October 12, 2017 11:35
  • chmod 400 key.pem
  • ssh -i "nick-aws-key.pem" ubuntu@ec2-public-dns.compute-1.amazonaws.com
  • sudo apt-get upgrade
  • sudo apt-get update
  • curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
  • sudo apt-get install -y nodejs
  • sudo apt-get install -y build-essential
  • sudo apt-get install awscli
  • sudo vi /etc/ssh/sshd_config
  • PasswordAuthentication no => PasswordAuthentication yes
@iSkore
iSkore / environmentSetup.sh
Last active August 22, 2017 20:29
Set up your dev environment in a single script - Install xcode first
#!/bin/bash
sudo xcodebuild -license
echo "
alias ll='ls -lGaf'
" >> ~/.bash_profile
sudo npm i -g pm2
@iSkore
iSkore / nginx_ssl.md
Last active June 26, 2017 11:48
nginx setup

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 nick@exploreplanet3.com -d sinopia.exploreplanet3.com --agree-tos

A RAW HISTORY DUMP... SORRY

@iSkore
iSkore / s3publish
Created April 15, 2017 14:54
Publish folder to S3
# Usage: `s3publish bucket-name default-profile`
# BUCKET to upload to
BUCKET=s3://$1
# Optional profile
PROFILE=$2
# specify folders if thou so choose
ENV=/
@iSkore
iSkore / eval.js
Created March 27, 2017 16:32
Is it eval?
'use strict';
function jsEval( jsString )
{
( ( () => {} ).constructor( jsString ) )();
}
jsEval( "console.log( 'hello world' );" );
@iSkore
iSkore / good_stuff.js
Last active March 15, 2017 20:57
Very helpful JavaScript functions
/**
* 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;