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
module.exports = function(grunt) { | |
'use strict' | |
grunt.initConfig({ | |
clean : [ | |
'js/GoalApp/js/modules/**/*.min.js', | |
'css/GoalApp/css/*.min.css' | |
], | |
uglify : { | |
build : { |
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 loadTemplate = function (templateFilePath, templateData) { | |
//console.info('Loading: ' + templateFilePath + ' with data:', templateData); | |
if (!APP.cache.templates[templateFilePath]) { | |
var templateDir = 'js/app/template/'; | |
var templateUrl = templateDir + templateFilePath + '.js'; | |
var templateString = ''; | |
$.ajax({ | |
async : 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
<body> | |
<div class="task api-1"></div> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script> | |
<script id="user-profile" type="text/template"> | |
<div class="user"> | |
<img src="<%= picture %>" alt=""> | |
<div class="info"> | |
<h3><%= name.first%> <%= name.last%></h3> | |
<dl> |
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 detectAnagrams(a, b) { | |
return a.toLowerCase().split('').sort().join('') === b.toLowerCase().split('').sort().join(''); | |
}; |
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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, 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
<?php | |
/** | |
* Plugin Name: Grunt Sitemap Generator | |
* Plugin URI: http://www.github.com/lgladdy | |
* Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php | |
* Author: Liam Gladdy | |
* Author URI: http://gladdy.co.uk | |
* Version: 1.0 | |
*/ | |
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 pageUrl = 'http://ez.local', | |
authAgent = new SessionAuthAgent({ | |
login : 'admin', | |
password: 'admin' | |
}), | |
jsRestClient = new CAPI(pageUrl, authAgent), | |
contentService = jsRestClient.getContentTypeService(), | |
parentLocationId = '/api/ezp/v2/content/locations/1/2/102', | |
contentTypeId = '/api/ezp/v2/content/types/16', | |
locationStruct = contentService.newLocationStruct(parentLocationId), |
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){ | |
var EVENT_EXISTS = 'GlobalEvents: Event already exists.'; | |
var eventIsRunning, | |
_eventStack, | |
_findByName, | |
stackEvent, | |
removeEvent, | |
eventListener, |
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
<div class="container"> | |
<div class="element"></div> | |
</div> |
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
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
* the height of element `.foo` —which is a full width and height cover image. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
*/ | |
OlderNewer