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
// Import lo-dash lang category | |
import lang from 'lodash/lang'; | |
// Import lo-dash template string function | |
import stringTemplate from 'lodash/string/template'; | |
// import assign from 'lodash/object/assign'; | |
import forEach from 'lodash/collection/foreach'; | |
// Loop through configs stored and return the matching config (value) element (key) | |
function reverseMapFind(id, map) { |
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
// truncate function from - http://stackoverflow.com/a/5723274 | |
var truncate = function (fullStr, strLen, separator) { | |
if (fullStr.length <= strLen) return fullStr; | |
separator = separator || '...'; | |
var sepLen = separator.length, | |
charsToShow = strLen - sepLen, | |
frontChars = Math.ceil(charsToShow/2), | |
backChars = Math.floor(charsToShow/2); |
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
var externalFile = $.ajax({ type:'GET', url:'http://example.com/style.css', dataType:'text' }); | |
externalFile.done(function() { | |
console.log('The external stylesheet has loaded with great success'); | |
}); | |
externalFile.fail(function() { | |
console.log('The external stylesheet failed to load'); | |
}); |
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 vidHack(event){ | |
if (Mtime === 0) { | |
console.log('I happen once') | |
var timecode = event.timeStamp; | |
Mtime++; | |
} else { | |
videoM.classList.remove('zero'); | |
videoM.muted= false; | |
console.log('I happen once after play'); | |
videoM.removeEventListener("timeupdate", vidHack, false); |
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'; | |
// Setup the explore tab | |
function InvdExplore(){ | |
// get some elements | |
this.left = document.getElementById('invd-left'); | |
this.right = document.getElementById('invd-right'); | |
this.shield = document.getElementById('invd-shield'); | |
this.shifter = document.getElementById('shifter'); // temp - demonstrating slow a tags |
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
/** | |
* Pass Bootstrap $screen-size or pixel string to generate media queries | |
* | |
Small | |
$screen-xs-max | |
$screen-sm-min | |
$screen-sm-max | |
Medium | |
$screen-md-min |
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
<canvas id="card" width="500" height="300">Your browser does not support this Application.</canvas> | |
<form> | |
<input id="text-input" placeholder="Matt Kelley" /> | |
<select id="textFont"> | |
<option value="item1">Item 1</option> | |
<option value="item2">Item 2</option> | |
<option value="item3">Item 3</option> | |
<option value="item4">Item 4</option> |
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 me2_nav_get_cities() { | |
$cache_key = 'me2_navigation_cities'; | |
/* Cache length in hours */ | |
$cache_time = 1; | |
// For Debug | |
//delete_transient( $cache_key ); |
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 extend(out) { | |
out = out || {}; | |
for (var i = 1; i < arguments.length; i++) { | |
if (!arguments[i]) | |
continue; | |
for (var key in arguments[i]) { | |
if (arguments[i].hasOwnProperty(key)) |
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
{ | |
"device": { | |
"text": "Samsung S4", | |
"manual": "http://www.fake.com/sgs4.pdf", | |
"legal": "Android is a trademark of Google, Inc. Use of this trademark is subject to Google Permissions. Gmail and the Gmail logo are trademarks of Google, Inc. Google and the Google logo are trademarks of Google, Inc. \"SAMSUNG\" is a trademark of SAMSUNG in the United States or other countries. Unauthorized use or duplication of these marks is strictly prohibited by law.", | |
"layout": { | |
"frame": { | |
"width": 280, | |
"height": 550 | |
}, |
OlderNewer