Skip to content

Instantly share code, notes, and snippets.

View pagameba's full-sized avatar

Paul Spencer pagameba

View GitHub Profile
Concept for auto-processing:
given an inventory of crafting cards holding recipes (input and output) and a machine that can turn the input into the output for each one:
Loop over slots in the inventory
For current slot
get output of recipe
get # of items in a storage control module
test < some value
if >
Error applying plan:
1 error(s) occurred:
* module.stack.module.ecs_cluster.aws_autoscaling_group.main: aws_autoscaling_group.main: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.
Please include the following information in your report:
Terraform Version: 0.10.4
Resource ID: aws_autoscaling_group.main
openssl s_client -showcerts -connect <host>:443
CONNECTED(00000003)
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
0 s:/CN=<host>
i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
-----BEGIN CERTIFICATE-----
@pagameba
pagameba / gist:2d62874662033f59de0260e6e4eb3048
Last active October 31, 2017 18:05
openssl output local
/usr/local/opt/openssl/bin/openssl s_client -showcerts -connect vault.inside.canvaspophq.com:443 -verify_hostname vault.inside.canvaspophq.com -servername vault.inside.canvaspophq.com -CApath /usr/local/etc/openssl/certs
CONNECTED(00000003)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = vault.inside.canvaspophq.com
verify return:1
---
Certificate chain
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": [
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_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}"
@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 };
export async function test() { }
@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