Skip to content

Instantly share code, notes, and snippets.

View etoxin's full-sized avatar

Adam Lusted etoxin

View GitHub Profile
@etoxin
etoxin / checklist.md
Last active October 6, 2016 01:41
Website Go Live Checklist Gotchas

Website Go Live Checklist Gotchas

Pre Developmenmt

HTML

  • Remove any http://placehold.it image placeholders.

CSS

@mixin displayFlexbox () {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
}
@etoxin
etoxin / GAME_MASTER_v0_1.json
Created July 18, 2016 04:14 — forked from rmkane/GAME_MASTER_v0_1.json
Pokemon GO Game Data
{
"Items": [ {
"TemplateId": "BADGE_BATTLE_ATTACK_WON",
"Badge": {
"BadgeType": "BADGE_BATTLE_ATTACK_WON",
"BadgeRanks": 4,
"Targets": "\\nd\\350\\007"
}
}, {
"TemplateId": "BADGE_BATTLE_TRAINING_WON",
@etoxin
etoxin / react-data-binding.js
Created July 18, 2016 03:57
Improved example of React data-binding
/*
* Improving upon example at: http://engineering.paiza.io/entry/2015/03/12/145216
*/
class MyApp extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
this.state = {
function parallax() {
window.onscroll = function() {
var speed = 5.0;
document.body.style.backgroundPosition = (-window.pageXOffset/speed)+"px "+(-window.pageYOffset/speed)+"px";
}
}
/**
* JS Throttle Function
* @example
$('body').on('mousemove', throttle(function (event) {
console.log('tick');
}, 1000));
*
* @param fn {Function} callback function
* @param threshhold {Number} Threshold in milliseconds
* @param scope {object} Scope to pass into function.
function debounce(fn, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
@etoxin
etoxin / UniqueID.js
Created June 16, 2016 02:03
Make a Unique ID
/**
* @param l {Number} Length of random string.
* @returns {string} String of random numbers
* @constructor
*/
function MakeId(l) {
var text = "",
possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < l; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
<h1 class="test">Responsive: </h1>
.parallax-window {
max-height: 30em;
overflow: hidden;
position: relative;
text-align: center;
width: 100%;
}
.parallax-static-content {
color: #9A9A8A;