Skip to content

Instantly share code, notes, and snippets.

View pagameba's full-sized avatar

Paul Spencer pagameba

View GitHub Profile
/*
* Portions of this code and logic copied from OpenLayers and
* redistributed under the original Clear BSD license terms:
*
* http://trac.osgeo.org/openlayers/browser/license.txt
*
* Copyright 2005-2010 OpenLayers Contributors, released under
* the Clear BSD license. See authors.txt for a list of contributors.
* All rights reserved.
*
@pagameba
pagameba / machine.js
Last active September 23, 2020 15:35
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@pagameba
pagameba / machine.js
Last active September 23, 2020 15:17
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@pagameba
pagameba / machine.js
Created September 22, 2020 12:56
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@pagameba
pagameba / machine.js
Last active September 21, 2020 19:55
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
export async function test() { }
@pagameba
pagameba / style.js
Created October 8, 2014 12:48
Create OL3 Style object(s) from object literals.
var styleMap = {
fill: function(obj) {
if (typeof obj == 'string' || Array.isArray(obj)) {
obj = { color: obj };
}
return new ol.style.Fill(obj);
},
stroke: function(obj) {
if (typeof obj == 'string' || Array.isArray(obj)) {
obj = { color: obj };
resource "aws_ecs_service" "service" {
name = "${var.name}"
cluster = "${var.ecs_cluster_id}"
task_definition = "${aws_ecs_task_definition.task.arn}"
desired_count = "${var.desired_count}"
iam_role = "${aws_iam_role.ecs_service_role.arn}"
deployment_minimum_healthy_percent = "${var.deployment_minimum_healthy_percent}"
deployment_maximum_percent = "${var.deployment_maximum_percent}"
resource "aws_iam_role_policy" "ecs_service_policy" {
name = "ecs-service-policy-${var.name}"
role = "${aws_iam_role.ecs_service_role.id}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
resource "aws_iam_role" "ecs_service_role" {
name = "ecs-service-role-${var.name}"
assume_role_policy = <<EOT
{
"Version": "2008-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": [