WOW! WatchJS became so popular that I've been pushed to migrate it to GitHub
https://github.com/melanke/Watch.JS
Just kidding
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
<?php | |
/* | |
This User model handles everything related to users. Most of the code is | |
ommitted, because it's not relevant to this example. | |
*/ | |
class User | |
{ | |
public static function loadUserByCredentials($username, $password) |
WOW! WatchJS became so popular that I've been pushed to migrate it to GitHub
https://github.com/melanke/Watch.JS
Just kidding
<?php | |
#Requires PHP 5.3.0 | |
define("CONSUMER_KEY", "consumer_key"); | |
define("CONSUMER_SECRET", "consumer_secret"); | |
define("OAUTH_TOKEN", "access_token"); | |
define("OAUTH_SECRET", "access_secret"); | |
function oauth_gen($method, $url, $iparams, &$headers) { |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
/* | |
* This decorates Handlebars.js with the ability to load | |
* templates from an external source, with light caching. | |
* | |
* To render a template, pass a closure that will receive the | |
* template as a function parameter, eg, | |
* T.render('templateName', function(t) { | |
* $('#somediv').html( t() ); | |
* }); | |
* Source: https://github.com/wycats/handlebars.js/issues/82 |
function eachAsync(collection, iterator, callback) { | |
var iterate = function(i) { | |
setTimeout(function() { | |
iterator(collection[i]); | |
if (i < collection.length) { | |
iterate(i + 1); | |
} else { | |
callback(); | |
} | |
}, 0); |
This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config
.
{ | |
"require": { | |
"illuminate/foundation": ">=1.0.0", | |
"illuminate/auth": ">=1.0.0", | |
"illuminate/database": ">=1.0.0", | |
"illuminate/view": ">=1.0.0", | |
"amazonwebservices/aws-sdk-for-php": "1.5.*", | |
"codeguy/upload": "*", | |
"sybio/image-workshop" : "*", |