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
| from pathlib import Path | |
| import pandas as pd | |
| import tarfile | |
| import urllib.request | |
| def load_housing_data(): | |
| tarball_path = Path("datasets/housing.tgz") | |
| if not tarball_path.is_file(): | |
| Path("datasets").mkdir(parents=True, exist_ok=True) | |
| url = "https://github.com/ageron/data/raw/main/housing.tgz" |
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
| data "archive_file" "folder_index_redirect_zip" { | |
| type = "zip" | |
| output_path = "${path.module}/folder_index_redirect.js.zip" | |
| source_file = "${path.module}/folder_index_redirect.js" | |
| } | |
| resource "aws_iam_role_policy" "lambda_execution" { | |
| name_prefix = "lambda-execution-policy-" | |
| role = aws_iam_role.lambda_execution.id |
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
| 'use strict'; | |
| const http = require('https'); | |
| const indexPage = 'index.html'; | |
| exports.handler = async (event, context, callback) => { | |
| const cf = event.Records[0].cf; | |
| const request = cf.request; | |
| const response = cf.response; |
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
| image: node:10.15.0 | |
| test: &test | |
| name: Install and Test | |
| script: | |
| - cd my-tools | |
| - npm install | |
| - npm test | |
| - npm pack | |
| artifacts: # defining the artifacts to be passed to each future step. | |
| # - dist/** |
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
| test: &test | |
| name: Install and Test | |
| image: node:10.15.0 | |
| caches: | |
| - node | |
| script: | |
| - npm install | |
| - npm test | |
| - npm run build | |
| artifacts: # defining the artifacts to be passed to each future step. |
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
| - pushd customer-reporting.sls && npm install serverless-plugin-aws-alerts && popd | |
| - | | |
| echo "Runway Execution Step............" | |
| if [[ "$BITBUCKET_BRANCH" == master ]]; then | |
| eval $(aws ecr get-login --no-include-email | sed 's;https://;;g') | |
| # do something | |
| else | |
| echo "Current branch is not master, skip"; | |
| fi |
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
| image: atlassian/default-image:2 | |
| pipelines: | |
| default: | |
| - step: | |
| name: "Build and push" | |
| services: | |
| - docker | |
| script: | |
| - IMAGE="bitbucketpipelines/hello-app-eks" |
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
| var synthetics = require('Synthetics'); | |
| const log = require('SyntheticsLogger'); | |
| const pageLoadBlueprint = async function () { | |
| // INSERT URL here | |
| const URL = "https://example.com"; | |
| const username = "[email protected]"; | |
| const passwd = "@#^!abcd1234" | |
| let page = await synthetics.getPage(); |
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
| acm.amazonaws.com | |
| alexa-appkit.amazon.com | |
| apigateway.amazonaws.com | |
| application-autoscaling.amazonaws.com | |
| appstream.application-autoscaling.amazonaws.com | |
| appsync.amazonaws.com | |
| athena.amazonaws.com | |
| autoscaling.amazonaws.com | |
| batch.amazonaws.com | |
| channels.lex.amazonaws.com |
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
| # adding and committing | |
| git add -A # stages All | |
| git add . # stages new and modified, without deleted | |
| git add -u # stages modified and deleted, without new | |
| git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed. | |
| git commit --amend --no-edit # Do so without having to edit the commit message. | |
| # remotes - pushing, pulling, and tracking | |
| git fetch # gets remote objects and refs. Needed if new branches were added on the remote. | |
| git remote -v # Lists all remotes (verbose) |
NewerOlder