Skip to content

Instantly share code, notes, and snippets.

View matthew-andrews's full-sized avatar

Matt Andrews matthew-andrews

View GitHub Profile
@matthew-andrews
matthew-andrews / description.md
Last active June 22, 2016 12:00
CloudFormation EventRule bug

Brief description of bug

If you create a CloudWatch Rule/Event through CloudFormation and assign it to a Lambda function, it will get into a slightly broken state where the Lambda function doesn't think it has a CloudWatch Rule/Event attached to it (and won't execute on that schedule) but the Rule/Event will think that it is associated with the Lambda function and won't allow you to add the Rule/Event again.

brokerules

Steps to reproduce

package main
import (
"crypto/md5"
"fmt"
"io"
"os"
)
func ComputeMd5(filePath string) ([]byte, error) {
@matthew-andrews
matthew-andrews / next-config-vars-client
Last active February 7, 2016 00:13
Get production config vars
curl -sL https://ft-next-config-vars.herokuapp.com/production/`cat package.json | json name` -H "Authorization: `heroku config:get APIKEY --app ft-next-config-vars`" | json --items -a key value -d = | sed 's/\(.*\)/-e \1/' | tr '\n' ' '
@matthew-andrews
matthew-andrews / SassMeister-input.scss
Created September 18, 2014 07:55
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
.block {
color: red;
&__element {
color: blue;
}
// Let us open our database
var request = window.indexedDB.open("toDoList", 4);
// these two event handlers act on the database being opened successfully, or not
request.onerror = function(event) {
note.innerHTML += '<li>Error loading database.</li>';
};
request.onsuccess = function(event) {
note.innerHTML += '<li>Database initialised.</li>';
@matthew-andrews
matthew-andrews / SassMeister-input.scss
Created September 12, 2014 21:48
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
%test {
margin: 10px;
}
.my-thing {
@matthew-andrews
matthew-andrews / SassMeister-input.scss
Created February 20, 2014 21:29
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.4)
// Compass (v1.0.0.alpha.18)
// ----
.foo {
background-color: pink;
&--bar {
background-color: white;
@matthew-andrews
matthew-andrews / SassMeister-input.scss
Created February 14, 2014 16:01
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.3)
// Compass (v1.0.0.alpha.18)
// ----
// Works only in sass 3.3 (not yet released)
.ui-list {
color: red;
@matthew-andrews
matthew-andrews / SassMeister-input.scss
Created February 11, 2014 16:39
Generated by SassMeister.com.
// ----
// Sass (v3.2.14)
// Compass (v0.12.2)
// ----
%test-1 {
background-color: blue;
}
%test-2 {
@matthew-andrews
matthew-andrews / SassMeister-input.scss
Created January 22, 2014 18:09
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@mixin o-hello-world($val: blue) {
background-color: $val;
}
@function o-fizz-buzz($some-number, $another-number) {