Skip to content

Instantly share code, notes, and snippets.

View trilopin's full-sized avatar
:octocat:

José Peso trilopin

:octocat:
  • Seedtag
  • Spain
  • 06:23 (UTC +02:00)
View GitHub Profile
@trilopin
trilopin / fabfile.py
Created November 20, 2015 07:15
fabfile with google compute engine (GCE) support + releases + virtualenv + supervisor
from fabric.api import env, run, sudo, local, runs_once
# Uncomment this two lines if you need debug mode
# import paramiko
# paramiko.common.logging.basicConfig(level=paramiko.common.DEBUG)
# gce conf
GCE_PROJECT = 'my-project'
GCE_ZONE = 'europe-west1-b'
GCE_HOSTMATCH = 'frontend.*'
GCE_GS_URL = 'gs://bucket/dir/'
@trilopin
trilopin / Phinx_MysqlAdapterUnitTest.php
Last active August 29, 2015 14:11
unit test with phpunit mocking for phinx mysqladapter
<?php
namespace Test\Phinx\Db\Adapter;
use Symfony\Component\Console\Output\NullOutput;
use Phinx\Db\Adapter\MysqlAdapter;
//trick for allow mocking PDO
class PDOMock extends \PDO
{