Skip to content

Instantly share code, notes, and snippets.

Resources:
CustomResourceRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: 'lambda.amazonaws.com'
@guillaumesmo
guillaumesmo / custom-task-definition.yml
Last active June 20, 2021 14:14
CloudFormation Custom Task Definition POC
# Sources:
# https://cloudonaut.io/how-to-create-a-customized-cloudwatch-dashboard-with-cloudformation/
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html
# https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ECS.html
Resources:
CustomTaskDefinition:
Type: 'Custom::TaskDefinition'
Version: '1.0'
Properties:
@guillaumesmo
guillaumesmo / git.sh
Last active August 21, 2018 00:28
Run public git repository in docker
#!/bin/bash
container=$(docker run -d -p 80:80 ynohat/git-http-backend)
docker exec ${container} sh -c "cd git && git init --bare $1.git && cd $1.git && git config http.receivepack true"
repo=$(curl -s https://$PWD_HOST_FQDN/sessions/$SESSION_ID | jq -r ".instances | to_entries[0].value | \"http://\" + .proxy_host + \"-80.direct.$PWD_HOST_FQDN/git/$1.git\"")
mkdir -p /root/htdocs/
echo "<h1>$1.git</h1>" >> /root/htdocs/index.html
@guillaumesmo
guillaumesmo / MainVerticle.java
Created May 29, 2018 21:25 — forked from jpkrohling/MainVerticle.java
The following is a complete Vert.x application demonstrating the Micrometer integration with Jaeger Java Client internal metrics
package io.vertx.starter;
import com.uber.jaeger.Configuration;
import com.uber.jaeger.micrometer.MicrometerMetricsFactory;
import com.uber.jaeger.samplers.ConstSampler;
import io.micrometer.core.instrument.Metrics;
import io.micrometer.prometheus.PrometheusConfig;
import io.micrometer.prometheus.PrometheusMeterRegistry;
import io.opentracing.Span;
import io.opentracing.Tracer;