Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember block helper</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
@koemeet
koemeet / JsonApiSerializer.php
Created November 21, 2014 20:33
JMS Serializer & willdurand Hateoas JSON-API serializer
<?php
/**
* This file is part of the Mango package.
*
* (c) Mango
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@koemeet
koemeet / gist:8eff6b8ad98ae76b74ac
Created December 22, 2014 22:37
Permutations variants
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@koemeet
koemeet / Vagrantfile
Last active May 8, 2016 10:42
Vagrant setup for docker (Mac + Win supported)
# UI Object for console interactions.
@ui = Vagrant::UI::Colored.new
# Install required plugins if not present.
required_plugins = ["vagrant-triggers", "vagrant-gatling-rsync"]
required_plugins.each do |plugin|
need_restart = false
unless Vagrant.has_plugin? plugin
system "vagrant plugin install #{plugin}"
need_restart = true
@koemeet
koemeet / setup_mac.sh
Created January 27, 2016 17:38
Setup Mac OSX to use vagrant + docker
#!/bin/bash
DOCKER_VERSION=1.9.0
DOCKER_COMPOSE_VERSION=1.5.0
# Console colors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[1;33m'
NC='\033[0m'
<?php
/**
* (c) Steffen Brem <steffenbrem@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mango\Bundle\CoreBundle\Form\Type;
{
"jsonapi":{
"version":"1.0"
},
"meta":{
"page":1,
"limit":6,
"pages":1,
"total":1
},
<?php
namespace spec\Mango\Bundle\CoreBundle\Mailer\Provider;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Sylius\Component\Mailer\Model\EmailInterface;
use Sylius\Component\Resource\Factory\FactoryInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
<?php
/**
* (c) Steffen Brem <steffenbrem@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mango\Bundle\ContentBundle\EventListener\PHPCR;
@koemeet
koemeet / application.controller.js
Last active March 23, 2016 05:26
Bug observer
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
// using ember data records
channels: function() {
return [
this.get('store').createRecord('channel', { name: 'First channel' }),
this.get('store').createRecord('channel', { name: 'Second channel' })