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
/* | |
Packages can be uploaded via CURL as specified in this document: | |
https://experienceleague.adobe.com/docs/experience-manager-65/administering/operations/curl.html?lang=en#user-management | |
$ curl -u <user>:<password> -F cmd=upload -F force=true -F [email protected] http://localhost:4502/crx/packmgr/service/.json | |
This is how it can be done in Golang, please note I've removed all error checking for brevity. | |
*/ | |
import ( |
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
/* | |
Took me a while to figure this out, this should never be so difficult IMHO. The dynamodb api could use more examples in its doc. | |
The documentation for doing this is scattered in a few places: | |
1. dynamodb api doc for golang: https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/ | |
2. the Update Expression: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html | |
The structs belowed are abbreviated for the sake of the demo: adding a string to the questions slice in the dynamodb table. |
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
1. Get the list of all launch configurations | |
aws autoscaling describe-launch-configurations | |
--region us-east-1 | |
--output text | |
--query 'LaunchConfigurations[*].LaunchConfigurationName' > launch_configs.txt | |
2. Get the list of in-use launch configurations from auto scaling groups, these are the configurations that are in use. | |
aws autoscaling describe-auto-scaling-groups |
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
{ | |
"family": "<service_name>", | |
"containerDefinitions": [ | |
{ | |
"name": "<service_name>", | |
"image": "<image_name>", | |
"cpu": 1, | |
"memory": 512, | |
"links": [], | |
"portMappings": [ |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"text/template" | |
"io/ioutil" | |
dockerapi "github.com/fsouza/go-dockerclient" |
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
int led = D7; | |
void setup() | |
{ | |
Spark.function("led", ledControl); | |
pinMode(led, OUTPUT); | |
digitalWrite(led, LOW); | |
} | |
void loop() |