Skip to content

Instantly share code, notes, and snippets.


Jérôme Foray Meroje

View GitHub Profile

Some Key points

[21:35:16] 1. Controllers call out to a repository to answer questions (like give me comments for a post, or are there any active users)
[21:35:27] so the repositories contain those business rules
[21:35:37] the entities (orm models) contain the application agnostic business rules
[21:35:42] like what makes a valid person
[21:36:09] 2. The repository interacts with the ORM to get the entities
[21:36:42] 3. The controller is merely responsible for processing the request, calling out to the appropriate repositories, and constructing the response
[21:36:52] All of the interactions are injected of course

Meroje / global.php
Created Dec 14, 2012
Illuminate custom Router (from JasonLewis)
View global.php
$app['router'] = $app->share(function($app)
return new Feather\Routing\Router($app);
View gist:50427926a655f8aa5f97
Verifying that +meroje is my blockchain ID.
View dabblet.css
* .elem outline box
.elem {
border: solid #6AC5AC 3px;
position: relative;
.elem p {
View 0-usage.php
with(new Page())->makeRoot();
with(new Page())->makePreviousSiblingOf(Page::find(1))
with(new Page())->makeNextSiblingOf(Page::find(1))
with(new Page())->makeLastChildOf(Page::find(5))
with(new Page())->makeFirstChildOf(Page::find(2))
Meroje /
Last active Jan 20, 2016
Coreos ipxe provision
wget -O cloud-config.yaml
coreos-install -d /dev/vda -c cloud-config.yaml
Meroje / comment.php
Created Dec 4, 2013
TimeDiff For Humans
View comment.php
use Carbon\Carbon;
class Comment extends Eloquent {
protected $guarded = array();
protected $softDelete = true;
public static $rules = array();
View settings.php
class DBconfiguratorObject implements ArrayAccess, Serializable {
protected $config = array();
protected $table = null;
private static $_instance = null;
public static function instance($tableName = 'config'){
if(self::$_instance === null){
self::$_instance = new self($tableName);
View webpack.config.js
/*! webpack.config.js | Build JS, CSS,.. client assets and StyleGuide */
'use strict';
var webpack = require('webpack');
var ExtractTextWP = require('extract-text-webpack-plugin');
var HtmlWP = require('html-webpack-plugin');
var path = require('path');
var moment = require('moment');
#!/usr/bin/env bash
# Based on
export PS4="\[\033[32;1m++\[\033[0m "
set -ex
You can’t perform that action at this time.