This file contains 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
// call this when you are done digging | |
var stopDigging; | |
(function () { | |
var dig = true, tryScroll, observer; | |
// create an observer instance | |
observer = new MutationObserver(function(mutations) { | |
mutations.forEach(function(mutation) { | |
tryScroll(); |
This file contains 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
// ensure namescope is available.. define it globally | |
var Via = Via || {}; | |
// pass global var | |
(function(Via) { | |
Via.startMsg = 'Ready!'; | |
Via._isDev = true; | |
Via.init = function() { | |
Via.log(Via.startMsg); |
This file contains 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
Document.prototype.ready = function(callback) { | |
if(callback && typeof callback === 'function') { | |
document.addEventListener("DOMContentLoaded", function() { | |
if(document.readyState === "interactive" || document.readyState === "complete") { | |
return callback(); | |
} | |
}); | |
} | |
}; |
This file contains 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
.clearfix:before, .clearfix:after | |
{ content: "\0020"; display: block; height: 0; overflow: hidden; } | |
.clearfix:after { clear: both; } | |
.clearfix { zoom: 1; } | |
.hidden { display: none;} | |
.error { color: #D9311E;} | |
.flex-wide { flex-grow: 999; } | |
.tall { height: 100%; } | |
.bold, strong { font-weight: 700; } | |
.italic { font-style: italic; } |
This file contains 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
#!/bin/bash | |
# How To Use: | |
# move this file to /usr/local/bin | |
# ensure script is executable `chmod +x killport` | |
# To kill any processes running on a known port use: | |
# > killport <port> | |
if [ $# -eq 0 ] | |
then |
This file contains 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
function newsletterSubscribe (name, email) { | |
// code | |
} | |
const newsletterSubscribe = (name, email) => { | |
// code | |
} |
This file contains 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
/************************* | |
Array Cheatsheet | |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#Browser_compatibility | |
**************************/ | |
let tmp1 = []; // "literal notation" | |
let tmp2 = new Array(); // potentially could be overwritten | |
let tmp3 = [5]; // [5] - length is 1 | |
let tmp4 = [1, 2, 3]; // [1, 2, 3] - length is 3 | |
let tmp5 = new Array(3); // [undefined, undefined, undefined] | |
// Properties |
This file contains 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
#!/bin/sh | |
# gets tag from current branch | |
# --abbrev set to 0 to find the closest tagname without any suffix | |
previousTag=$(git describe --abbrev=0 --tags) | |
messages=$(git log --pretty=format:"- %s (%h)" "$previousTag"...HEAD) | |
echo "## Commits in this release:" | |
echo "$messages" |
This file contains 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
#!/bin/sh | |
# get the current branch name | |
branchName=$(git symbolic-ref --short HEAD) | |
# get the branch name to match from params | |
# if no params, use `master` | |
if [ "$1" != "" ]; then | |
masterBranch="$1" | |
else | |
masterBranch="master" | |
fi |
This file contains 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'; | |
const fs = require('fs'); | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf-8'); | |
let inputString = ''; | |
let currentLine = 0; |
OlderNewer