Skip to content

Instantly share code, notes, and snippets.

View alle's full-sized avatar

Alessandro Frangioni alle

View GitHub Profile
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* Mongo Auth driver. Adapted from Kohana_Auth_ORM.
*/
class Auth_Mongo extends Auth {
/**
* Checks if a session is active.
*
* @param string role name
@alle
alle / config.js
Created December 6, 2013 09:14
changing directive template with decorator (for ng-YouTubeAPI.js), like http://angular-tips.com/blog/2013/09/experiment-decorating-directives/
app.config(function($provide) {
$provide.decorator('ytPlaytoDirective', function($delegate) {
var directive = $delegate[0];
directive.template = '<h5>{{ title }}, {{ viewCount }}</h5>';
return $delegate;
});
});
@alle
alle / install-kohana.sh
Created October 18, 2011 09:25 — forked from sebacruz/install-kohana.sh
A script to install the Kohana PHP Framework
#!/bin/sh
# have submodules been added?
MODS=0
# Github base URL
GITHUB="https://github.com"
# Default branch
DEFAULT_BRANCH="3.0/master"