Skip to content

Instantly share code, notes, and snippets.

View duellsy's full-sized avatar

Chris Duell duellsy

View GitHub Profile
@mathieuletyrant
mathieuletyrant / config.yml
Created November 23, 2018 12:44
circleCI config with Sentry
# Release new release on sentry
sentry-release:
working_directory: ~/repo
docker:
- image: circleci/node:10.11
steps:
- checkout
- run:
name: Install Sentry cli
command: curl -sL <https://sentry.io/get-cli/> | bash
@thepsion5
thepsion5 / controller.php
Last active August 29, 2015 13:56
In example illustration of how to use a base query function to generate a filtered and sorted query without repeating code for each function.
<?php
public function index()
{
if(Input::get('sort')) {
$this->offices->sort(Input::get('sort'), Input::get('direction'));
}
$offices = $this->offices->all();
return View::make('app.offices.list', compact('offices'));
}
@clouddueling
clouddueling / console.log
Created January 4, 2014 05:59
My only take away from Paul Irish's talk on workflow. Run this in your Chrome console. :)
console.log('%c I AM UNICORN!!!', 'color: #fff; font-size: 30px; font-family: Verdana; text-shadow: 0px 2px 3px #555; padding: 20px 400px; width: 100%; background: #F66 url(rainbow-gradient.jpg); background-image: -moz-linear-gradient( left top, right bottom , from(red), color-stop(16%, orange), color-stop(32%, yellow), color-stop(48%, green), color-stop(60%, blue), color-stop(76%, indigo), to(violet)); /*webkit rainbow gradient*/ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.00, red), color-stop(16%, orange), color-stop(32%, yellow), color-stop(48%, green), color-stop(60%, blue), color-stop(76%, indigo), color-stop(1.00, violet));}');
@duellsy
duellsy / BaseController.php
Created August 23, 2013 03:19
Displaying multiple revisions
<?php
class BaseController extends Controller
{
/**
* Setup the layout used by the controller.
*
* @return void
*/
@duellsy
duellsy / view.blade.php
Last active December 17, 2015 09:58
Check that a section has content in a laravel view, so you can determine if you want to display certain wrapping content etc
@if($__env->yieldContent('messages') != '')
<div class="messages">
<h1>Messages</h1>
@yield('messages')
</div>
@endif
@henrikbjorn
henrikbjorn / CodeCoverage.php
Created November 7, 2012 11:52
CodeCoverage for PHPSpec2
<?php
namespace Vandpibe\PHPSpec\Extension;
use PHPSpec2\ServiceContainer;
use PHP_CodeCoverage;
use PHP_CodeCoverage_Report_HTML;
class CodeCoverage implements \PHPSpec2\Extension\ExtensionInterface
{