http://tinkerman.cat/rpi3_iot_server.pdf (Catalan)
- download the latest image
| // Use this code snippet in your app. | |
| // If you need more information about configurations or implementing the sample code, visit the AWS docs: | |
| // https://aws.amazon.com/developers/getting-started/nodejs/ | |
| // Load the AWS SDK | |
| var AWS = require('aws-sdk'), | |
| region = "eu-central-1", | |
| secretName = "amplify-console-app/githubAaccessToken", | |
| secret, | |
| decodedBinarySecret; |
| #!/bin/bash | |
| set -euo pipefail | |
| # given an aws-cdk bundle archive (the one published to github releases), extract | |
| # all .jsii manifests and places them under "jsii/*.jsii" | |
| # now they can be used with jsii-reflect | |
| zip=${1:-} | |
| if [ -z "${zip}" ]; then | |
| echo "Usage: $(basename $0) <cdk-bundle-zip>" |
| docker run -v /var/run/docker.sock:/var/run/docker.sock -v /usr/local/bin/docker:/usr/bin/docker --group-add root -it --rm jenkins bash | |
| then docker ps | |
| # missing group-add directive and the wrong group causes Permission Denied on the docker.sock file | |
| # on an MacOs Mojave and docker desktop 2.1.0.5 with docker engine 19.03.5 | |
| # the --group-add root setting was neccessary at the time of writing. | |
| # | |
| # earlier solutions on that issue point to groups docker, jenkins, 100, or other groups | |
| # the group-add directive as is seems to be common sense ;-) |
| /* | |
| I was curious as to whether it was possible to make resources | |
| created using CDK constructs work with raw CloudFormation | |
| resources and vice versa. | |
| This aws-cdk app demonstrates a VPC and an ELB that belongs to it | |
| in different, dependant stacks, leveraging CFN outputs / imports, | |
| and leveraging CDK's method of passing information from one | |
| stack to another. | |
| */ |
| name: Build and publish Jekyll Docker image for Octocat Generator | |
| on: [push] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: clean up, docker login && docker build && docker push |
| console.log('Loading function'); | |
| const doc = require('dynamodb-doc'); | |
| const dynamo = new doc.DynamoDB(); | |
| /** | |
| * Demonstrates a simple HTTP endpoint using API Gateway. You have full | |
| * access to the request and response payload, including headers and | |
| * status code. |
| # cloning only a specific branch | |
| git clone --depth 1 -b <branch-name> <git-repo-url> | |
| # ... into a separate directory | |
| BRANCH_NAME="<branch-name>";git clone --depth 1 -b $BRANCH_NAME <git-repo-url> $BRANCH_NAME | |
| # list remote branches | |
| git ls-remote --heads <git-repo-url> | |
| # ... or use --all | |
| git branch --all |
| 'use strict'; | |
| const zlib = require('zlib'); | |
| const content = ` | |
| <\!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Simple Lambda@Edge Static Content Response</title> |
| 'use strict'; | |
| exports.handler = (event, context, callback) => { | |
| // Get request and request headers | |
| const request = event.Records[0].cf.request; | |
| const headers = request.headers; | |
| // Configure authentication | |
| const authUser = 'user'; | |
| const authPass = 'pass'; |
http://tinkerman.cat/rpi3_iot_server.pdf (Catalan)