This file contains hidden or 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
/** | |
* Environment | |
* Lets us manage assets based on current environment | |
*/ | |
class Environment { | |
/** | |
* @param $localEnvironment (default value is 'localhost' if nothing is passed) | |
* @return boolean | |
*/ |
This file contains hidden or 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 | |
/** | |
* FormHandler takes care of automatically collecting form data and sending the data to a specified email address | |
* | |
* @example: | |
* $form = new FormHandler($from = '[email protected]', $to = '[email protected]', $subject = $_POST['form-name'], $post_data_prefix = 'obf_'); | |
*/ | |
class FormHandler { | |
public $mail; |
This file contains hidden or 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
// http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically | |
module.exports = function(grunt) { | |
/** | |
* Saves having to declare each dependency | |
*/ | |
require( "matchdep" ).filterDev( "grunt-*" ).forEach( grunt.loadNpmTasks ); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), |
This file contains hidden or 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
/** | |
* Template | |
* This allows fetching of non-essential assets via AJAX | |
* e.g. megamenu | |
* @param object, configuration parameters | |
*/ | |
function Template(config) { | |
this.fetchFile = config.fetchFile; | |
this.partialsDir = config.partialsDir || '/partials/'; | |
this.fetchURL = this.partialsDir + this.fetchFile; |
This file contains hidden or 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
/** | |
* Detects using window.performance | |
* We can serve small images first, then upgrade on faster connections | |
* See: http://mattandrews.info/talks/port80-2013/#/ | |
*/ | |
(function () { | |
var perf = window.performance, | |
start = perf.timing.requestStart, // just before page is requested | |
end = perf.timing.responseStart, // first byte received |
This file contains hidden or 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 | |
/** | |
* Vimeo class to fetch thumbnails | |
* @example | |
* $video = new VimeoThumbnail(array( | |
* 'video_url' => $url | |
* )); | |
* echo $video->thumbnail; | |
*/ |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am tjFogarty on github. | |
* I am fogarty (https://keybase.io/fogarty) on keybase. | |
* I have a public key whose fingerprint is F16E EE8B 30A4 6EA4 8B9B 3293 9C3D FA76 F916 7210 | |
To claim this, I am signing this object: |
This file contains hidden or 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
// inject bower components | |
gulp.task('wiredep', function () { | |
gulp.src('./partials/*.php') | |
.pipe(wiredep({ | |
directory: './bower_components/' | |
})) | |
.pipe(gulp.dest('./partials')); | |
}); |
This file contains hidden or 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
/* globals $, jQuery, Foundation */ | |
/* jshint node:true */ | |
'use strict'; | |
window.MQ = (function(MQ, $, queries) { | |
/** | |
* $cache elements | |
* @type {Object} |