Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 * as pulumi from "@pulumi/pulumi"; | |
| import * as aws from "@pulumi/aws"; | |
| // The services we want to host on our domain... | |
| const api1 = new aws.apigateway.x.API("api1", { | |
| routes: [ | |
| {method: "GET", path: "/", eventHandler: async(ev) => { | |
| return { | |
| statusCode: 200, | |
| body: JSON.stringify({hello: "world"}), |
This file contains hidden or 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
| // This is a simple, *insecure* hash that's short, fast, and has no dependencies. | |
| // For algorithmic use, where security isn't needed, it's way simpler than sha1 (and all its deps) | |
| // or similar, and with a short, clean (base 36 alphanumeric) result. | |
| // Loosely based on the Java version; see | |
| // https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript | |
| const simpleHash = str => { | |
| let hash = 0; | |
| for (let i = 0; i < str.length; i++) { | |
| const char = str.charCodeAt(i); | |
| hash = (hash << 5) - hash + char; |
This file contains hidden or 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
| # Install Jenkins on AWS EC2 instance | |
| # https://pkg.jenkins.io/redhat/ | |
| # https://d1.awsstatic.com/Projects/P5505030/aws-project_Jenkins-build-server.pdf | |
| # https://d1.awsstatic.com/Projects/P5505030/aws-project_Jenkins-build-server.pdf | |
| # https://gist.github.com/diegopacheco/6d69e0cfaf13d4351cfa700bb4af8172 | |
| # https://www.youtube.com/watch?v=uu5XcU4EPzQ | |
| sudo yum update |