Skip to content

Instantly share code, notes, and snippets.

View trq's full-sized avatar

Tony R Quilkey trq

  • thorpesystems
  • Sydney, Australia
View GitHub Profile
Portage 2.2.2 (default/linux/amd64/2008.0, gcc-4.4.5, libc-0-r0, 2.6.32-042stab016.1 x86_64)
=================================================================
System uname: Linux-2.6.32-042stab016.1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.1.8
Portage Tree: /usr/portage
Portage HEAD: b1e527493d08bf2a016db6e1df1875fd95008734 /usr/portage/.git/refs/heads/funtoo.org
app-shells/bash: 4.1_p10
dev-lang/python: 2.6.6-r1
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.1.8-r2
sys-apps/openrc: 0.7.0
#!/bin/bash
RESTORE='\033[0m'
RED='\033[00;31m'
GREEN='\033[00;32m'
brew_php_link=$(ls -l /usr/local/bin/php | grep -Eo 'php([0-9]{1,2})')
current_php_version=$(php --version | head -n1 | awk '{print $2}')
<?php
interface foo {
public function x();
}
interface bar {
public function y();
}
abstract class ChainEventAbstract implements ChainEventInterface
{
/**
* Define the method to be called on the way into the filter.
*
* @param Proem\Service\AssetManagerInterface $assets
*/
abstract public function in(AssetManagerInterface $assets);
/**
use \Mockery as m;
class ChainEventTest extends \PHPUnit_Framework_TestCase
{
public function testCanInstantiate()
{
$this->assertInstanceOf('Proem\Filter\ChainEventInterface', m::mock('Proem\Filter\ChainEventInterface'));
}
public function testInAndOutAreCalledOnInit()
<?php
$routes->group(['hostname' => '{username}.domain.com'], function() use ($routes) {
$routes->attach('user.home', new Route('/'));
$routes->attach('user.edit', new Route('/edit'));
});
@trq
trq / gist:5279318
Created March 31, 2013 02:56
Composer init and install
composer init --require=proem/proem:0.10.0-alpha6 -n && composer install --dev
<?php
// Some logger interface
interface LoggerInterface
{
public function log($message);
}
// Some class that relies upon the LoggerInterface interface
@trq
trq / gist:6017160
Last active December 19, 2015 20:59
# I have a command "opm" which takes, for example argument like:
# opm lfs-base/gcc-4.2 configure
#
# The first argument represents a build script in the format of <category>/<package>-<version>
#
# These build scripts are stored within /var/opm/opms/ in a structure similar to:
# .
# |-- lfs-base
# | |-- autoconf
# | | |-- 2.69.opm
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out