Skip to content

Instantly share code, notes, and snippets.

View seiffert's full-sized avatar
🌥️

Paul Seiffert seiffert

🌥️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am seiffert on github.
  • I am hashipaul (https://keybase.io/hashipaul) on keybase.
  • I have a public key whose fingerprint is 80A9 7F79 E6E3 C64A 1735 D046 AA5A CCDD DF77 1DA6

To claim this, I am signing this object:

@seiffert
seiffert / docker inspect
Created May 19, 2015 07:37
Docker Inspect of AWS ECS agent container
[{
"AppArmorProfile": "",
"Args": [],
"Config": {
"AttachStderr": true,
"AttachStdin": false,
"AttachStdout": true,
"Cmd": null,
"CpuShares": 0,
"Cpuset": "",
@seiffert
seiffert / user data
Created May 19, 2015 07:35
ECS Machines Cloud Init
#cloud-config
write_files:
- path: /etc/systemd/system/docker.service.d/50-insecure-registry.conf
content: |
[Service]
Environment='DOCKER_OPTS=--insecure-registry="<private-hosted-zone-domain-of-registry>" --registry-mirror="http://<private-hosted-zone-domain-of-registry>"'
- path: /etc/ecs/ecs.config
permissions: 0644
owner: root
content: |
@seiffert
seiffert / docker log
Created May 19, 2015 07:30
AWS ECS log
2015-05-18T22:59:55Z [INFO] Starting Agent module="main"
2015-05-18T22:59:55Z [INFO] Loading configuration module="main"
2015-05-18T22:59:56Z [INFO] Loading state! module="statemanager"
2015-05-18T22:59:56Z [INFO] Restored cluster module="main" cluster="crims"
2015-05-18T22:59:56Z [INFO] Restored state module="main" containerInstance="arn:aws:ecs:eu-west-1:691344588897:container-instance/a99f767d-0794-4ea0-b785-26a4
8d914251" cluster="crims"
2015-05-18T22:59:56Z [INFO] Saving state! module="statemanager"
2015-05-18T22:59:56Z [INFO] Removing container module="TaskEngine" task="registry-proxy-7 arn:aws:ecs:eu-west-1:691344588897:task/c7bebb9e-7a2a-4f9a-9e77-bfa3
6dc0fbef, Status: (STOPPED->STOPPED) Containers: [registry-proxy--nginx (STOPPED->STOPPED),]" container="registry-proxy--nginx-registry.wonderland/registry-pr
oxy (STOPPED->STOPPED) - Exit: 137"
<?php
use \Phpmig\Adapter;
use Sensio\Bridge\Phpmig\ContainerAdapter;
require_once __DIR__ . '/autoload.php';
require_once __DIR__ . '/AppKernel.php';
$kernel = new AppKernel('dev', true);
$kernel->boot();
<?php
namespace Sensio\Bridge\Phpmig;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* The ContainerAdapter allows the Symfony DIC to be used with phpmig. Phpmig is the tool that's used for executing
* migrations on the application and expects a service container that implements \ArrayAccess. This is achieved by
* wrapping Symfony's DIC with an adapter that implements \ArrayAccess and proxies to the DIC.
"
/**
* @jsx React.DOM
*/
var converter = new Showdown.converter(),
CommentBox = React.createClass({displayName: 'CommentBox',
loadCommentsFromServer: function() {
$.ajax({
url: '/comments.json',
<!-- template.html -->
<html>
<head>
<title>Hello React</title>
<script src="build/react.min.js"></script>
<script src="build/JSXTransformer.js"></script>
<script src="build/showdown.js"></script>
<script src="build/jquery-1.8.1.min.js"></script>
</head>
<body>
FibonacciSequence := Object clone
FibonacciSequence cache := List clone
FibonacciSequence simple := method (num,
if (num <= 2,
1,
self calc(num)
)
)
@seiffert
seiffert / gist:1461978
Created December 11, 2011 18:31
Mayflower Blog - ZF vs. Symfony2 - Sample Service Definition
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="welcome.mailer.acme.user" class="Acme\UserBundle\WelcomeMailer" public="false">
<tag name="welcome.mailer" />
<argument type="service" id="acme.mailer" />