Skip to content

Instantly share code, notes, and snippets.

View jiggliemon's full-sized avatar

Chase Wilson jiggliemon

View GitHub Profile
var tournament = {
regions:['West','South','East','North']
,teams : {
"array" : [
{
"abbr" : "ALA ST",
"hashTag" : "#ASUBasketball",
"link" : "alabama-st",
"nickname" : "Hornets",
"school" : "Alabama St.",
var PageParams = {
generateSanitizedHash: function (object) {
return encodeURIComponent(this.Base64.encode(JSON.stringify(object)));
},
objectToHash: function (object) {
return this.generateSanitizedHash({"page_params": object});
},
hashToObject: function (hash) {
@jiggliemon
jiggliemon / .DS_Store
Created February 8, 2012 00:43
A Simple Template constructor
var configProduct = {
"attributes" : {
"128" : {
"code" : "color_hat",
"id" : "128",
"label" : "Hat Color",
"options" : [
{
"id" : "6",
"label" : "Black",
@jiggliemon
jiggliemon / Prop.js
Created December 27, 2011 23:52
How to save Model data
var ModelMixin = {
get: function ( key , args ) {
var isFn = (typeof this[key] === 'function');
return isFn? this[key].apply(this,args): this[key] ;
}
,set: function ( key, value ) {
if(typeof key === 'string') {
this[key] = value;
#tab-wrapper
#tab-inner
#header-wrapper
#header-inner
#field-wrapper
#field-inner
#field-header-wrapper
#field-header-inner
#field-body-wrapper
#field-body-inner
alert($('select-me').get('text'));
var Feature = new Class({
initialize: function (el) {
var el = this.el = document.id(el);
var options = this.getObjectFromAttributes(el);
var feature = options.feature = this.getType(el);
if (el.get('text')) {
options.template = el.get('text');
}
@jiggliemon
jiggliemon / UserApplication.js
Created November 14, 2011 18:50
Library dependencies.
require({
packages: [
{
name: 'Poly'
,location: '/js/lib/Polyfills/Source'
}
{
name: 'Mootools'
,location: '/js/lib/Milk/Source'
@jiggliemon
jiggliemon / Object.merge.js
Created November 9, 2011 08:27
Merge in values from other objects that share the master objects properties.
if(typeof Object.merge !== 'function')
Object.merge = function() {
var base = arguments[0]
args = Array.prototype.slice.call(arguments,1),
count = args.length,
keys = Object.keys(base),
mergeIn = undefined,key = undefined,i = 0;
mergeIn = function(obj){
var keys = Object.keys(this),