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
/*! A fix for the iOS orientationchange zoom bug. | |
Script by @scottjehl, rebound by @wilto. | |
MIT / GPLv2 License. | |
*/ | |
(function(w){ | |
// This fix addresses an iOS bug, so return early if the UA claims it's something else. | |
var ua = navigator.userAgent; | |
if( !( /iPhone|iPad|iPod/.test( navigator.platform ) && /OS [1-5]_[0-9_]* like Mac OS X/i.test(ua) && ua.indexOf( "AppleWebKit" ) > -1 ) ){ | |
return; |
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 (window) { | |
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6. | |
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling. | |
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction). | |
// This code is free to use by anyone (MIT, blabla). | |
// Author: rkorving@wizcorp.jp | |
var timeouts = {}; | |
var intervals = {}; |
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
/* | |
* Minimal classList shim for IE 9 | |
* By Devon Govett | |
* MIT LICENSE | |
*/ | |
if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') { | |
Object.defineProperty(HTMLElement.prototype, 'classList', { | |
get: function() { |
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
// go to http://marak.com/faker.js/ | |
var employees = []; | |
for (var i = 1; i <= 50; i++) { | |
var firstName = faker.name.firstName(); | |
var lastName = faker.name.lastName(); | |
employees.push({ | |
id: i, |
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
{ | |
"always_show_minimap_viewport": true, | |
"color_scheme": "Packages/Dracula Color Scheme/Dracula.tmTheme", | |
"default_encoding": "UTF-8", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": false, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", |
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
/** | |
* position trait | |
*/ | |
const position = (state) => ({ | |
setPosition (x, y) { | |
state.x = x | |
state.y = y | |
} | |
}) |
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 mysql = require('mysql'); | |
const Prom = require('bluebird'); | |
Prom.promisifyAll(require('mysql/lib/Connection').prototype); | |
Prom.promisifyAll(require('mysql/lib/Pool').prototype); | |
let pool = mysql.createPool({ | |
host: 'localhost', |