[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
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
$app['router'] = $app->share(function($app) | |
{ | |
return new Feather\Routing\Router($app); | |
}); |
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
Verifying that +meroje is my blockchain ID. https://onename.com/meroje |
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
/** | |
* .elem outline box | |
*/ | |
.elem { | |
border: solid #6AC5AC 3px; | |
position: relative; | |
} | |
.elem p { |
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 | |
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)) | |
Page::find(2)->children() | |
Page::find(2)->parent() | |
Page::find(2)->sibling() | |
Page::find(2)->isDescendant(Page::find(3)) |
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
#!/bin/bash | |
wget -O cloud-config.yaml http://10.10.20.1/cloud-config.php | |
coreos-install -d /dev/vda -c cloud-config.yaml | |
reboot |
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 | |
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); |
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
/*! 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'); |
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
#!/usr/bin/env bash | |
# Based on https://github.com/edanaher/scaleway-utils/blob/45d89a534d0ff9427a120e509d215e195fe083dc/tinc/add-tinc.sh | |
export PS4="\[\033[32;1m++\[\033[0m " | |
set -ex | |
HOST=$1 | |
TINCIP=$2 | |
TINCNAME=${3:-$1} |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
DOCUMENTATION = ''' | |
--- | |
module: scw_facts | |
''' | |
EXAMPLES = ''' | |
# To see the list of all the facts use command below: |