Skip to content

Instantly share code, notes, and snippets.

View drewsonne's full-sized avatar

Drew J. Sonne drewsonne

  • Sainsburys
  • London, United Kingdom
  • 01:17 (UTC +01:00)
View GitHub Profile
<?php
/**
* Log memory usage.
*
* Makes use of {@link https://gist.github.com/1849563 _log} and {@link https://gist.github.com/2880386 formatMemory}.
*
* @author Craig Anderson <craiga@craiga.id.au>
* @link https://gist.github.com/3336985
*/
protected function _logMemoryUsage()
@drewsonne
drewsonne / _.md
Created January 16, 2015 21:49
Drag and Drop Container Divs
@drewsonne
drewsonne / _.md
Created January 16, 2015 21:49
Drag and Drop Container Divs
#!/bin/bash
# SSH into a Vagrant VM, forwarding ports in a way that allows node within Vagrant to be debugged by a debugger
# or IDE in the host operating system. Don't know why, but Vagrantfile port forwarding does not work.
# (https://groups.google.com/forum/#!topic/vagrant-up/RzPooJ0dp6Q)
# Usage:
# vagrant-ssh-node [port]
PORT="$1"
@drewsonne
drewsonne / README.md
Last active March 10, 2016 08:47
Python Stub files

How to do type hinting in Python2.x. You'll probably need to pip install typing for the typing package.

Keybase proof

I hereby claim:

  • I am drewsonne on github.
  • I am drewsonne (https://keybase.io/drewsonne) on keybase.
  • I have a public key whose fingerprint is 5445 C40B 65CD F3E3 1813 70E7 C66F A94B E050 18AC

To claim this, I am signing this object:

@drewsonne
drewsonne / SAP_CLA
Created August 15, 2017 12:17 — forked from CLAassistant/SAP_CLA
SAP Individual Contributor License Agreement
###SAP Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by SAP SE or its affiliates (“SAP”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to SAP in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@sap.com.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to SAP a non-exclusive, perpetual, irrevocable, worldwid
* gocd_pipeline_stage.test: Received HTTP Status '422 Unprocessable Entity': '{
"message": "Validations failed for pipeline 'test-pipeline3'. Error(s): [Validation failed.]. Please correct and resubmit.",
"data": {
"_links": {
"self": {
"href": "http://127.0.0.1:8153/go/api/admin/pipelines/test-pipeline3"
},
"doc": {
"href": "https://api.gocd.org/#pipeline-config"
},
{
"pipeline": {
"group": "",
"_links": {
"self": {
"href": "http://127.0.0.1:8153/go/api/admin/pipelines/test-pipeline3"
},
"doc": {
"href": "https://api.gocd.org/#pipeline-config"
},
@drewsonne
drewsonne / 0-start-docker
Last active September 20, 2017 09:41
Re-create issues with update auto_update
#!/usr/bin/env bash
docker run -d -p8153:8153 -p8154:8154 gocd/gocd-server:v17.10.0
ENDPOINT="http://127.0.0.1:8153/go/api/admin/config.xml"
function get_status {
curl -H 'Accept: application/vnd.go.cd.v3+json' \
--write-out %{http_code} \
--silent \
--output /dev/null \