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.
// includes bindings for fetching/fetched | |
PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
this.page = 1; | |
}, | |
fetch: function(options) { | |
options || (options = {}); | |
this.trigger("fetching"); |
* { | |
-webkit-border-radius: 0 !important; | |
-moz-border-radius: 0 !important; | |
border-radius: 0 !important; | |
-webkit-box-shadow: 0 !important; | |
-moz-box-shadow: 0 !important; | |
box-shadow: 0 !important; | |
-webkit-transition: none !important; |
<?php | |
// Wrapper function to access urlFor. | |
function slim_url_for($name, $params = array()) { | |
return Slim::getInstance()->urlFor($name, $params); | |
} | |
// Setup Twig. | |
TwigView::$twigDirectory = '/path/to/twig/'; | |
// Expose urlFor to Twig. |
/** | |
* User: k33g (Original Author) | |
* Date: 26/08/11 | |
* User: mbrio (Added ability to create and specify multiple storage engines) | |
* Date: 12/12/11 | |
*/ | |
(function(Backbone) { | |
Backbone.storageEngines = { | |
default: Backbone.sync, |
// If you don't use underscore.js, use it (http://documentcloud.github.com/underscore/) | |
// Then, use underscore's mixin method to extend it with all your other utility methods | |
// like so: | |
_.mixin({ | |
escapeHtml: function () { | |
return this.replace(/&/g,'&') | |
.replace(/>/g,'>') | |
.replace(/</g,'<') | |
.replace(/"/g,'"') | |
.replace(/'/g,'''); |
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.
CREATE DEFINER = 'root'@'localhost' FUNCTION `Convert_FR`(chIFfre varchar(20), SM varchar(40),CM varchar(40)) | |
RETURNS varchar(255) CHARSET utf8 COLLATE utf8_unicode_ci | |
NOT DETERMINISTIC | |
CONTAINS SQL | |
SQL SECURITY DEFINER | |
COMMENT '' | |
BEGIN | |
DECLARE ch_int Varchar(20); | |
DECLARE ch, ch_r Varchar(255); | |
DECLARE i, fin_I INT; |
var AUTH_URL = "https://api.glitch.com/oauth2/authorize?response_type=code&client_id=000yourclientid000&redirect_uri=http://yoursitehere/oauth/&scope=identity"; | |
var Auth_Router = Backbone.Router.extend({ | |
routes: { | |
"": "root", | |
"oauth/?code=:code": "auth" | |
}, | |
root: function () {}, | |
auth: function (code) { | |
Meteor.call('authenticate', code, function (error, result) { |
<?php | |
# 1. Ensure you have Slim installed and in your include path. | |
# 2. Ensure you have createsend-php installed and in your include path. | |
# 3. Set CREATESEND_CLIENT_ID, CREATESEND_CLIENT_SECRET, | |
# and CREATESEND_REDIRECT_URI environment variables for | |
# your registered OAuth application. | |
require 'createsend/csrest_general.php'; | |
require 'Slim/Slim.php'; | |
\Slim\Slim::registerAutoloader(); |