Skip to content

Instantly share code, notes, and snippets.

View Brunty's full-sized avatar

Matt Brunt Brunty

View GitHub Profile

Keybase proof

I hereby claim:

  • I am Brunty on github.
  • I am brunty (https://keybase.io/brunty) on keybase.
  • I have a public key whose fingerprint is 07B9 7329 66B8 9BF9 E9D5 B0B8 F652 2873 B77E DDB6

To claim this, I am signing this object:

@Brunty
Brunty / resize.js
Created May 11, 2015 09:39
Only perform actions after window has finished resizing
/*
By default, $(window).resize() will fire every time the window is resized, so for each pixel it moves, it's called.
This isn't necessarily always needed and some things can be left to when the window has finished resizing.
We don't have a (native) way of doing this, but with this little snippet you can achieve basically what we want.
*/
var windowResize;
$(window).resize(function() {
// Clear the timeout each time the window is resized
clearTimeout(windowResize);
@Brunty
Brunty / grid.scss
Last active August 29, 2015 14:21
Grid
/*
Rough first-go, need to create mixins so you can use these styles in your own classes.
But for now, you can just use the grid classes and it'll work.
*/
$column-gutter: 26px;
$default-padding: $column-gutter / 2;
$max-row-width: 1000px;
/*
This kinda thing should be in a normalise file anyway - but if not, throw it in somewhere.
@Brunty
Brunty / .gitignore_global
Created September 24, 2015 15:16
Global Gitignore
*~
.buildpath
.project
.settings
.vagrant
#########################
# OS X
#########################
@Brunty
Brunty / bdd-behat-telling-stories-through-code.md
Last active December 10, 2015 22:50
Behaviour Driven Development and Behat: Telling Stories Through Code

Behaviour Driven Development and Behat: Telling Stories Through Code

Stories? Scenarios? BDD? Are these just more words in the ever-growing list of jargon that developers have to know? Or are they something more important than new terms to memorise?

In this session we'll look at how BDD fits into the software development work-flow, how to tell user stories through features, and how to automate them in Behat.

@Brunty
Brunty / .gitignore_global
Created February 16, 2016 10:42
Global Gitignore - in ~/
*~
.buildpath
.project
.settings
.vagrant
#########################
# OS X
@Brunty
Brunty / products.go
Last active June 12, 2016 11:39
Style opinion time - which do you prefer? 1 or 2
type Money struct {
isoCode string
symbol string
value int
}
type Product struct {
name string
price Money
}
@Brunty
Brunty / behat.yml
Created September 14, 2016 09:40
Not very well documented behat config options
default:
gherkin:
cache: '%paths.base%/app/cache'
@Brunty
Brunty / Jenkinsfile
Created September 30, 2016 15:10
UAT deployments
stage("Deploy to UAT" ) {
node {
def gitCommit = gitCommit()
ansiblePlaybook extraVars: [release_version: "$gitCommit"],
inventory: 'ansible/inventories/uat',
playbook: 'ansible/deploy-uat.yml'
}
}
<?php
namespace App\Context;
use Behat\Behat\Context\Context;
use Symfony\Component\Process\Process;
class ServerContext implements Context
{
const TIMEOUT = 10;