Skip to content

Instantly share code, notes, and snippets.

Avatar

Michaël Gallego bakura10

  • Sapporo, Japan
View GitHub Profile
View gist:8963942
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
View gist:8963830
{
"minimum-stability": "dev",
"require": {
"php": ">=5.5",
"zendframework/zendframework": "2.2.*",
"doctrine/migrations": "~1.0@dev",
"doctrine/orm": "2.5.x-dev",
"doctrine/doctrine-orm-module": "0.9.x-dev",
"slm/mail": "~1.3",
"slm/queue-sqs": "0.3.x-dev",
View foo.php
<?php
require __DIR__ . '/vendor/autoload.php';
use \Zend\EventManager\ListenerAggregateInterface;
use \Zend\EventManager\EventManagerInterface;
class Listener implements ListenerAggregateInterface
{
protected $bigService;
View test.php
// We have traversed the whole path, return the last matched path!
if (empty($subPath)) {
if ($previousMatch === null) {
$data = $resource->getData();
$data = $data->matching(new Criteria());
return new SubPathMatch(new Resource($data, $resource->getMetadata()), $subPath);
}
return $previousMatch;
View EmberRenderer.php
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
View ember.js
module.exports = App.ApplicationRoute = Ember.Route.extend(Ember.SimpleAuth.ApplicationRouteMixin, {
/**
* Setup the application controller
*
* @param controller
*/
setupController: function(controller) {
var projects = this.get('session.user.projects');
if (projects.get('length') > 0) {
View route.js
module.exports = App.ResourcesRoute = Ember.Route.extend(Ember.SimpleAuth.AuthenticatedRouteMixin, {
renderTemplate: function() {
this.render('sidebar', {into: 'project', outlet: 'sidebar', controller: 'application'});
}
});
@bakura10
bakura10 / EmberRenderer.php
Created Mar 1, 2014
This is a renderer for Ember-Data for ZfrRest
View EmberRenderer.php
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
View test.yaml
s3_id: fff
s3_secret: fff
s3_bucket: fff
# Below are examples of all the available configurations.
# See README for more detailed info on each of them.
max_age:
"fonts/*": 31536000
"javascripts/*": 31536000
View form.js
'use strict';
/**
* Basic form
*/
module.exports = App.ValidatableFormComponent = Ember.Component.extend({
/**
* @type {String}
*/
tagName: 'form',
You can’t perform that action at this time.