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
<?php
/**
* @test
*
* @expectedException \RuntimeException
*/
function throws_exception()
{
$sut = new SomeSut();
@trq
trq / TestCase.php
Last active December 1, 2016 12:07
<?php
// ...
/**
* Does the response contain all required attributes of a JSONApi Response Resource.
*
* @param array|null $resource
*/
protected function assertJsonAPIIsValidResource(?array $resource = null)
composer require \
doctrine/mongodb \
alcaeus/mongo-php-adapter \
doctrine/mongodb-odm \
doctrine/mongodb-odm-bundle \
-vv --ignore-platform-reqs
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l | grep "The agent has no identities" && ssh-add
#!/bin/bash
current=$PWD
cd $HOME
sudo brew install zsh
chsh -s /bin/zsh $USER
brew tap thoughtbot/formulae
#!/bin/bash
current=$PWD
cd $HOME
sudo apt-get install zsh
chsh -s /bin/zsh $USER
wget https://thoughtbot.github.io/rcm/debs/rcm_1.3.0-1_all.deb
<?php
/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Repositories\TaskRepository;
class TaskController extends Controller
{
@trq
trq / poc.yml
Created November 27, 2015 07:52
category_list:
path: /{filter}/{category_slug}.{_format}
requirements:
filter: articles|galleries
_format: html|json
defaults:
_format: html
_entity_resolution:
strategy: via_section_and_type
_response_resolution:
@trq
trq / bootstrap.sh
Last active October 14, 2015 02:45
bootstrap a dev box
#!/usr/bin/env bash
cd ~/
mkdir -p bin src/{news,trq,utils,thoughtbot} var
# install rcm
wget https://thoughtbot.github.io/rcm/debs/rcm_1.2.3-1_all.deb
sudo dpkg -i rcm_1.2.3-1_all.deb