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 / cprogram.md
Last active March 3, 2016 01:33
C Program in c minor

Square Wave

^   squ x
	 |
	,|, 1 _________________                       _
	 |                     |                     |
	 |                     |                     |
	 |                     |                     |
"""".*""""""""""|""""""""""|."""""""""|""""""""".|"""">
@iSkore
iSkore / unittest.js
Last active March 20, 2016 21:26
Gist unit test example
var arr = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u
@iSkore
iSkore / timestamp.js
Last active September 12, 2016 16:14
Excellent time stamp function
function getNow( off ) {
let date = new Date();
date.setTime( date.getTime() + ( 3600000 * off || 0 ) );
let y = date.getFullYear(),
mo = date.getMonth() + 1,
d = date.getDate(),
h = date.getHours(),
m = date.getMinutes(),
s = date.getSeconds(),
mm = date.getMilliseconds();
@iSkore
iSkore / peekaboo.md
Last active March 31, 2016 19:41
Show and hide files alias in terminal

Show and hide files with showfiles - hidefiles

printf '''\nalias showfiles="\ndefaults write com.apple.finder AppleShowAllFiles YES\nkillall -KILL Finder"\n''' >> ~/.bash_profile && printf '''alias hidefiles="\ndefaults write com.apple.finder AppleShowAllFiles NO\nkillall -KILL Finder"\n''' >> ~/.bash_profile && source ~/.bash_profile

Now you can easily hidefiles and showfiles for hidden .gitconfig for instance

@iSkore
iSkore / environment.md
Last active May 12, 2016 19:00
Mac environment needs

Environment needs

Constantly updated list of environment needs for OSX environment

  1. Magnet - go throught the set up and boot at login
  2. WebStorm - License it, theme = dracula, javascript = ES6, keybind Run = ⌘R
#!/bin/bash

while true; do
@iSkore
iSkore / socketTalk.js
Created April 19, 2016 19:23
Talk to sockets
const http = require('http');
// Create an HTTP server
var srv = http.createServer( (req, res) => {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('okay');
});
srv.on('upgrade', (req, socket, head) => {
socket.write('HTTP/1.1 101 Web Socket Protocol Handshake\r\n' +
'Upgrade: WebSocket\r\n' +
@iSkore
iSkore / SlickPractice.js
Created April 21, 2016 18:37
Double, isEven, getFileExtension, longestString, arraySum fun functions
'use strict';
function doubleInteger( i ) {
// i will be an integer. Double it and return it.
return i * 2;
}
function isNumberEven( i ) {
// i will be an integer. Return true if it's even, and false if it isn't.
return ( i % 2 === 0 );
@iSkore
iSkore / recursiveRemoveFiles.js
Last active May 5, 2016 15:27 — forked from liangzan/recursiveRemoveFiles.js
A Node.js script to remove all files in a directory recursively
const fs = require( 'fs' )
, path = require( 'path' )
, _ = require( 'lodash' );
let rootPath = "/path/to/remove";
rmRF(rootPath);
function rmRF( dirPath ) {
fs.readdir( dirPath, ( err, files ) => {
if ( err ) console.log( JSON.stringify( err ) );
/*
* Below is an example of when to use `var` and `let`
*/
'use strict';
let a = 'a';
var b = 'b';
const c = 'c';
@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