This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
// SPDX-License-Identifier: MIT-0 | |
// default imports | |
const AWSXRay = require('aws-xray-sdk-core') | |
const AWS = AWSXRay.captureAWS(require('aws-sdk')) | |
const { metricScope, Unit } = require("aws-embedded-metrics") | |
const DDB = new AWS.DynamoDB({ apiVersion: "2012-10-08" }) | |
// environment variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 50 GiB. | |
SIZE=${1:-50} | |
# Get the ID of the environment host Amazon EC2 instance. | |
INSTANCEID=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
# Get the ID of the Amazon EBS volume associated with the instance. | |
VOLUMEID=$(aws ec2 describe-instances \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"dynamodb:GetItem", | |
"dynamodb:PutItem", | |
"dynamodb:Query" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
####################################################################################### | |
# | |
# On WP2Static, targetdir = /opt/bitnami/wordpress/wp-content/static-version/deploy | |
# the script is executed outside the deploy dir in case you need to do any transfomations | |
# before the actual sync. | |
# | |
# Earlier version contained for example, hash of the deploy dir and its files for | |
# comparison, but since we're using s3 sync, no need to keep that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#bin/bash | |
sox -n -r 44100 -c 2 silence.wav trim 0.0 2 | |
lame -b 32 --resample 8 -a silence.wav silence.mp3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## API Gateway "Send Everything" Mapping Template - Ryan Green - ryang@ryang.ca | |
## See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html | |
#set($allParams = $input.params()) | |
{ | |
"body-json" : "$input.json('$')", | |
"params" : { | |
#foreach($type in $allParams.keySet()) | |
#set($params = $allParams.get($type)) | |
"$type" : { | |
#foreach($paramName in $params.keySet()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public SubscriptionClient createSubscriptionClient() { | |
//default sem timeouts | |
// PREFERRED_API_URL => http://subscription.bemobi.com.br/sc/ | |
// pode ser sobrescrita pelo pela propriedade de ambiente -Dcom.bemobi.subscription.client.host ou pelo | |
// método #setPreferredAddress(URL); | |
//SubscriptionJAXRSClient client = new SubscriptionJAXRSClient(); | |
int TIMEOUT_IN_MILIS = 35 * 1000; | |
int MAX_CONNECTION_IN_POOL = 100; | |
return new SubscriptionJAXRSClient(TIMEOUT_IN_MILIS, TIMEOUT_IN_MILIS, MAX_CONNECTION_IN_POOL); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.lambdaworks.redis.RedisAsyncConnection; | |
import com.lambdaworks.redis.RedisClient; | |
import com.lambdaworks.redis.SetArgs; | |
import org.slf4j.Logger; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.CommandLineRunner; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import redis.clients.jedis.Jedis; | |
import redis.clients.jedis.JedisPool; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osboxes deploy # ./deploy.sh | |
** Starting zipkin-cassandra | |
9fc184535addcaaaa55de0df11241c3e9c806c174986ef8142e4282f12198367 | |
** Starting zipkin-collector | |
ad7ac5b12f80463044b65e75b88fe36e245c98dacc0c9b46eeeee3310061d480 | |
2015/03/24 05:48:01 Error response from daemon: Cannot start container ad7ac5b12f80463044b65e75b88fe36e245c98dacc0c9b46eeeee3310061d480: Cannot link to a non running container: /zipkin-cassandra AS /zipkin-collector/db | |
** Starting zipkin-query | |
2ff7e1cb21a7198685be229a84f242a59028e11363cf2d8853bbe821075f08bd | |
2015/03/24 05:48:03 Error response from daemon: Cannot start container 2ff7e1cb21a7198685be229a84f242a59028e11363cf2d8853bbe821075f08bd: Cannot link to a non running container: /zipkin-cassandra AS /zipkin-query/db | |
** Starting zipkin-web |
NewerOlder