Skip to content

Instantly share code, notes, and snippets.

View andrewhowdencom's full-sized avatar
💭
Delivering Giblets

Andrew Howden andrewhowdencom

💭
Delivering Giblets
View GitHub Profile
<?php
/**
* Howdenio Monolog extension
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@andrewhowdencom
andrewhowdencom / setcookie.php
Last active August 29, 2015 14:27
Nginx alpha batch cookie bug
<?php
/**
* This works fine without the http2 directive. However, if the http2 directive is enabled, all cookies after
* the first cookie are lost.
*
* Working | listen: 443 ssl;
* Broken | listen: 443 ssl http2;
*/
// Set three cookies
<!-- SUPER HACKY FAST WRITEUP -->
<!-- This does nothing -->
<script data-main="path/main.js" />
<!-- Not so good, as it blocks DOM -->
<script type="text/javascript" src="require.js" />
<script type="text/javascript" src="path/main.js" />
<!-- Not so good, as main.js may include require(['foo', 'bar'], function(f, b) {}); which has no meaning outside require.js -->
syntax on
# Use VIM, the one true editor.
export VISUAL=vim
export EDITOR="$VISUAL"
@andrewhowdencom
andrewhowdencom / gist:7ce842855c2a34a90685342a1f17664b
Created June 23, 2016 12:10
(If my smoke screens are any good) I couldn't even break prod if I tried.
● 22:01 ~/Development/web/m2pwa.littleman.co $ kubectl get pods
NAME READY STATUS RESTARTS AGE
letsencrypt-deployment-1892913836-pd0q7 1/1 Running 0 12m
nginx-deployment-2849758121-yvsfo 1/1 Running 0 12m
nginx-deployment-2987973546-fw8ac 0/1 CrashLoopBackOff 1 8s
nginx-deployment-2987973546-tkcy5 0/1 CrashLoopBackOff 1 8s

Keybase proof

I hereby claim:

  • I am andrewhowdencom on github.
  • I am andrewhowdencom (https://keybase.io/andrewhowdencom) on keybase.
  • I have a public key whose fingerprint is 79BA C08A 6ED1 FF1E ABE3 50A7 587D 3B3A 961D 2D2D

To claim this, I am signing this object:

@andrewhowdencom
andrewhowdencom / template-string.js
Last active August 24, 2016 06:07
Playing with template strings
var template = `This is a lovely notion, but I\'m not sure if ${whoever} will go for it`;
var whoever = 'you';
console.log(template);
@andrewhowdencom
andrewhowdencom / safety.yaml
Created October 20, 2016 22:24
Today I did something stupid and rm -rf'd root. Never again.
---
- name: "Install tools to prevent the developer hurting themselves"
package:
name: "{{ item }}"
state: "latest"
with_items:
- "safe-rm"
- name: "Replace the normal rm command with safe-rm"
alternatives:
apiVersion: v1
data:
all-nodes-dashboard.json: |-
{
"dashboard": {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",