This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace div\Core; | |
use Illuminate\Container\Container; | |
use ReflectionFunction; | |
use Closure; | |
use div; | |
class Module extends Container { | |
protected static $scriptClosureMap = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use div\Std\App; | |
use div\Std\Http; | |
use div\Std\Jobs; | |
use Illuminate\Http\Request; | |
$app = new App('app', __DIR__.'/..', include 'config.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
req #1 : 150ms | |
req #2 : 130ms | |
req #3 : 152ms | |
req #4 : 111ms | |
req #5 : 119ms | |
req #6 : 116ms | |
req #7 : 124ms | |
req #8 : 125ms | |
req #9 : 135ms | |
req #10 : 120ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// needs underscore and Backbone.Events( really didn't want to code that stuff up :P) | |
window.sandBoxFactory = function () { | |
var vent = _.extend({}, Backbone.Events); // The event aggregator for the sandbox | |
var communicatorEvents = []; | |
var broadCasters = {}; | |
var sandBox = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://vimeo.com/53221560 | |
http://vimeo.com/53221558 | |
http://vimeo.com/49718712 | |
http://www.youtube.com/watch?v=f6kdp27TYZs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//class definition + constructor | |
function FooFactory(bar, baz) { | |
/* return an object with a set of properties and functionalities | |
tied together using closuers and lexical scoping */ | |
} | |
// actual object construction | |
var foo = FooFactory(bar, baz); | |
//inheritance (via as many object as you want) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
for a given instalment, interest, and number of years, calculate the compounded amount. | |
USAGE: | |
python compound.py instalment interest, years | |
""" | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('/', function() | |
{ | |
return View::make('home.index'); | |
}); | |
Route::controller('home'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Gen { | |
public static void main(String[] args) { | |
Foo<Integer> a = new Foo<Integer>(123); | |
// Baz b = new Baz("aha"); | |
System.out.println(a.bar.toString()); | |
// System.out.println(b.bar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('sorter').config(function ($routeProvider, $locationProvider) { | |
// code fuplicated here, cos can't find a way to use custom service in config | |
var $uri = (function () { | |
var pageBase = '/admin/classification/sorter/app/', tmplBase = '/js/sorter/tmpls/', | |
apiBase = '/admin/classification/sorter/api/' | |
return { | |
page: function (uri) { return pageBase + uri; }, | |
tmpl: function (uri) { return tmplBase + uri; }, | |
api: function (uri) { return apiBase + uri; } |
OlderNewer