Skip to content

Instantly share code, notes, and snippets.

@AlyxRen
AlyxRen / jquery.extTmpl.js
Created October 15, 2010 17:01
Load a template file from a external source on the same domain. supports passing AJAX data for dynamic templates, as well as caching.
(function($){
var cache, defaults;
cache = {};
defaults = {
//ajax information
'url': "",
'method': "GET",
/**
* --------------------------------------------------------------------
* jQuery-Plugin "pngFix"
* Version: 1.2, 09.03.2009
* by Andreas Eberhard, andreas.eberhard@gmail.com
* http://jquery.andreaseberhard.de/
*
* Copyright (c) 2007 Andreas Eberhard
* Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
*
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
/*!
* $.expressions
* (c) Stephen Middleton 2010
* Licensed under the MIT license
* <http://www.opensource.org/licenses/mit-license.html>
* Makes an easier modifying method to add Psuedo Expressions
* Syntax::
* //no variables
* $.expressions("hasText", function(ArgumentsArray, LocationInList, List){
* //if returns true, it will be in the list, otherwise it's be filtered out
<?php
/*!
* Class db
* (c) Stephen Middleton 2010
* Liscensed under the MIT Liscense
* <http://www.opensource.org/licenses/mit-license.html>
* Provides a Filesystem JSON-store to store information in a document Fashion
* See <http://www.json.org> for more information on the JSON format.
*
* Usage::
<?php
/*!
* class Is
* (c) Stephen Middleton 2010
* Liscensed under the MIT Liscense
* <http://www.opensource.org/licenses/mit-license.html>
* Provides Static methods to determine the type on an inputted element.
* Also exposes functions nessicary to test if [[Type]].
*
* Usage::
class foo
constructor: ()->
alert 'fooBar'
a: ->
b: ->
c: ->
d: ->
e: ->
f: ->
###
fab Coffee Converter
Built in Coffeescript
written by Stephen "Rixius" Middleton <Rixius@gmail.com>
Released under the MIT liscense <http://www.opensource.org/licenses/mit-license.php>
###
fab= require 'fab'
coffee= require 'coffee'
"use strict"
extend= (inp...)->
output= {}
for val1 in inp
for key2,val2 of val1
output[key2] = val2
output
<?php
/*!
* class Is
* Provides Static methods to determine the type on an inputted element.
* Also exposes functions nessicary to test if [[Type]].
*
* Usage::
* if ( Is::_Array($arr) ){...}
*
* $typeof = Is::_Test($variable);