Skip to content

Instantly share code, notes, and snippets.

View etiennemarais's full-sized avatar
🇿🇦
...

Etienne Marais etiennemarais

🇿🇦
...
View GitHub Profile
@etiennemarais
etiennemarais / example.php
Last active April 11, 2016 14:03
Recursive match for array keys based of checking through a array of variables in a mustache template with it's includes
<?php
class ArrUtils
{
/**
* @param $searchKey
* @param $dataArray
* @return boolean
*/
protected function isKeyInArray($searchKey, $dataArray)
{
@etiennemarais
etiennemarais / helpers.php
Created March 14, 2016 12:09 — forked from mabasic/helpers.php
config_path function for Lumen framework
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
@etiennemarais
etiennemarais / PackerPolicy.json
Last active March 1, 2016 14:25 — forked from MattSurabian/PackerPolicy.json
Minimum IAM policy required by AWS for Packer to do its thing.https://github.com/mitchellh/packer Permissions are broken out by API functionality and a resource array has been defined with a wild card for each group. For tighter security resource level permissions can be applied per this documentation: http://aws.typepad.com/aws/2013/07/resource…
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PackerSecurityGroupAccess",
"Action": [
"ec2:CreateSecurityGroup",
"ec2:DeleteSecurityGroup",
"ec2:DescribeSecurityGroups",
"ec2:AuthorizeSecurityGroupIngress",
@etiennemarais
etiennemarais / test.txt
Created January 8, 2015 10:40
Proposed Architecture
// App / app HTTP | commands | console | events
/ Http
/ Commands
/ Messages
/ MessageNewHttpCommand.php
/ Events
/ Messages
/ MessageWasCreatedEvent.php