Skip to content

Instantly share code, notes, and snippets.

View dave-newson's full-sized avatar

Dave Newson dave-newson

View GitHub Profile
@dave-newson
dave-newson / readme.md
Last active October 20, 2022 23:32
Windows 10 + Console2 + Cygwin
@dave-newson
dave-newson / codeception-2-2-4-segault.md
Created February 21, 2017 02:37
Codeception 2.2.4 Segfault

Foreword

The codeception version i'm using is super old. This is being posted for awareness.

What doing

Running a codeception.yml with multiple suites under a single config, using Symfony 2.8.3

Specific versions in play:

  • Symfony 2.8.3 (7a9a5fce7ce6e448e527f635463dda00761e12c2)
@dave-newson
dave-newson / sumResolver.php
Created November 24, 2016 01:17
PHP sum possibilities resolver.
/**
* Takes an array of input values eg. [1, 2, 3]
* Takes a number of math operators eg. [+, -, *]
* Determines all possible permutations of sums that can be made using:
* - any combination of operators, including repeating operators (plus one equals sign)
* - any sequence (but no repeating) of the given numbers.
*
* Used to solve a maths puzzle because I'm stupid.
*/
class SumFinder
:: IE DNS Cache Buster
::
:: Because IE keeps a hold of the DNS Cache for up to 30 minutes.
:: https://support.microsoft.com/en-au/kb/263558
::
:: Created based on
:: http://blog.patrickmeenan.com/2012/11/clearing-ies-caches-not-as-simple-as-it.html
::
:: This is an overly-violent method of killing the web cache, and probably has lots of nightmarish side-effects.
:: If you can, changing the Registry value as mentioned in KB-263558 is probably a lot safer.
@dave-newson
dave-newson / hal-example.xml
Created November 26, 2015 23:12 — forked from mikekelly/hal-example.xml
Example usage of the media type application/hal+xml
<resource rel="self" href="/" xmlns:ex="http://example.org/rels/">
<link rel="ex:look" href="/bleh" />
<link rel="ex:search" href="/search?term={searchTerm}" />
<resource rel="ex:member" name="1" href="/foo">
<link rel="ex:created_by" href="/some_dude" />
<example>bar</example>
<resource rel="ex:status" href="/foo;status">
<some_property>disabled</some_property>
</resource>
</resource>
@dave-newson
dave-newson / v1nce.ids
Created November 25, 2015 22:09
PhpStorm Styles
<scheme name="v1nce" version="141" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="10" />
<option name="CONSOLE_FONT_NAME" value="Source Code Pro" />
<option name="CONSOLE_FONT_SIZE" value="9" />
<option name="EDITOR_QUICK_DOC_FONT_SIZE" value="XX_SMALL" />
<option name="EDITOR_FONT_NAME" value="Consolas" />
<colors>
<option name="ADDED_LINES_COLOR" value="295622" />
<option name="ANNOTATIONS_COLOR" value="8b999f" />
@dave-newson
dave-newson / .UE4 Code Snippets
Last active August 29, 2015 14:23
UE4 Code Snippets
Code and things.
@dave-newson
dave-newson / toggle-checkbox.js
Last active January 10, 2018 05:00
Bootstrap-toggle AngularJS directive
'use strict';
/**
* Bootstrap-toggle Directive
* @link https://github.com/minhur/bootstrap-toggle
*/
angular.module('toggleCheckbox', [])
.directive('toggleCheckbox', function() {
/**