Skip to content

Instantly share code, notes, and snippets.

@owzzz
owzzz / panellasList.js
Last active December 24, 2015 09:29
First Pass at mocked Panellas List
[{
"name": "Panella1",
"id": "01",
"avatarUrl": "http://www.placehold.it/50x50"
},
{
"name": "Panella2",
"id": "02",
"avatarUrl": "http://www.placehold.it/50x50"
},
@owzzz
owzzz / gist:6554727
Last active December 23, 2015 00:39
I have a path key called "Controllers" which is assigned an array of paths to my individual controller files. I was hoping I could reference the "Controllers" alias in my require function as a dependency and it would then go back and require the array of controller paths. Is this possible?
require.config({
paths: {
angular: 'libs/angular.min',
responder: 'libs/responder.min',
jquery: 'libs/jquery/jquery.min',
app: 'app',
settings: 'settings',
helpers: 'helpers',
factories: 'factories/factories',
services: 'services/services',
'use strict';
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// set up config
grunt.initConfig({
// Define the module.
define(
[
"require"
],
function( require ){
// Define the states of loading for a given set of modules
// within a require() statement.
@owzzz
owzzz / enqueue_script_conditional.php
Created November 5, 2012 21:57 — forked from clarklab/enqueue_script_conditional.php
WordPress conditional JS enqueue
<?php
if (is_page('Contact')) {
wp_register_script( 'contact-form', 'http://ajax.googleapis.com/contact-form.js');
wp_enqueue_script( 'contact-form' );
}
?>
@owzzz
owzzz / Time Ago Function
Last active October 12, 2015 11:37
Parse Twitter's Created_At Date
var K = function () {
var a = navigator.userAgent;
return {
ie: a.match(/MSIE\s([^;]*)/)
}
}();
var parseDate = function(tdate) {
var system_date = new Date(Date.parse(tdate));
var user_date = new Date();