Skip to content

Instantly share code, notes, and snippets.

Mostly writing Go!

Ewan Valentine EwanValentine

Mostly writing Go!
View GitHub Profile
View nginx.conf
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
http {
include mime.types;
EwanValentine /
Created Mar 27, 2017
Go + Docker build script example
source ~/.bashrc
echo "Building"
# Build Go binary in Docker image
docker run --rm \
-e "GOPATH=/go" \
-e "CGO_ENABLED=0" \
-e "GOOS=linux" \
View gist:4ee3b97c2505a267423e
package main
import (
type Container map[string]interface{}
func (container Container) Add(name string, object interface{}) Container {
container[name] = object
EwanValentine / AbstractCommandTestHelper.php
Last active Aug 29, 2015
Symfony2 command unit test helper class.
View AbstractCommandTestHelper.php
namespace Ladbible\BaseBundle\Tests\Command;
use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\StreamOutput;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Bundle\FrameworkBundle\Console\Application;
View gist:5ccf8049979b56a4f29c
namespace MyBundle\ApiBundle\Entity;
use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
use Doctrine\ORM\Mapping as ORM;
* @ORM\Entity