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
// 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
<?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
/** | |
* 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
var el = document.getElementsByTagName('html')[0]; | |
el.className = el.className.replace('no-js', 'js'); |
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
// Any iframes with a class of .yt will be collected for event tracking | |
var Youtube = { | |
$players: $( '.yt' ), | |
playerArray: [], | |
numPlayers: $( '.yt' ).length - 1, | |
init: function() { | |
Youtube.assignID(); | |
Youtube.bindEvents(); | |
}, |
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 | |
include('db.class.php'); | |
$database = new Database(); | |
$database->dbUrl = 'localhost'; //URL of database | |
$database->dbUser = 'root'; // Username | |
$database->dbPass = ''; // Password | |
$database->dbName = 'test_db'; // Name of database you wish to connect to |
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
<div class="container"> | |
<div id="slider-container"> | |
<ul class="slider-images clearfix"> | |
<li><img class="scale" src="http://dummyimage.com/500x200/000/fff.gif&text=Slide+1" alt=""></li> | |
<li><img class="scale" src="http://dummyimage.com/500x200/fff/000.gif&text=Slide+2" alt=""></li> | |
<li><img class="scale" src="http://dummyimage.com/500x200/000/fff.gif&text=Slide+3" alt=""></li> | |
<li><img class="scale" src="http://dummyimage.com/500x200/fff/000.gif&text=Slide+4" alt=""></li> | |
</ul> | |
</div> |
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
<a href="#" class='notify'>Success!</a> | |
<a href="#" class='notify error'>Error :(</a> |