$ aws ecr get-login --region ap-southeast-1
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws help
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 {Entity} from "../../../../../../src/decorator/entity/Entity"; | |
| import {PrimaryColumn} from "../../../../../../src/decorator/columns/PrimaryColumn"; | |
| import {Column} from "../../../../../../src/decorator/columns/Column"; | |
| @Entity() | |
| export class Post { | |
| @PrimaryColumn() | |
| id: number; |
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
| # Login to AWS registry (must have docker running) | |
| docker-login: | |
| $$(aws ecr get-login --no-include-email --region us-east-1 --profile=mycompany) | |
| # Build docker target | |
| docker-build: | |
| docker build -f Dockerfile --no-cache -t mycompany/myapp . | |
| # Tag docker image | |
| docker-tag: |
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
| machine: | |
| pre: | |
| - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0 | |
| - sudo curl -L -o /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` | |
| - sudo chmod +x /usr/local/bin/docker-compose | |
| services: | |
| - docker | |
| dependencies: | |
| override: | |
| # generate a .env file by interpolating the template (.env.example) with environment variables (defined in circleci) |
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
| def handler(event, context): | |
| client = boto3.client('batch', 'us-east-1') | |
| analyzer_job = client.submit_job( | |
| jobName='ma-analyzer', | |
| jobQueue='ma', | |
| jobDefinition='ma-analyzer:1', | |
| containerOverrides={ | |
| 'command': ['python', 'service.py'] | |
| }) |
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
| /* | |
| https://www.youtube.com/watch?v=iOGIKG3EptI | |
| https://github.com/awslabs/aws-go-wordfreq-sample/blob/master/cmd/uploads3/main.go | |
| https://docs.aws.amazon.com/sdk-for-go/api/aws/ | |
| - first configure your aws credentials run: aws configure | |
| - go get -u github.com/aws/aws-sdk-go/aws | |
| - login to UI web aws s3 interface | |
| - go to S3 service |
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 { EditorState, Modifier, Entity, SelectionState } from 'draft-js' | |
| import linkifyIt from 'linkify-it' | |
| import tlds from 'tlds' | |
| const linkify = linkifyIt() | |
| linkify.tlds(tlds) | |
| const linkifyEditorState = (editorState) => { | |
| const contentState = editorState.getCurrentContent() |
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
| class SomeExport(luigi.Task): | |
| date = luigi.DateParameter(default=datetime.date.today()) | |
| def output(self): | |
| return luigi.s3.S3Target(self.date.strftime('s3://mybucket/%Y%m%d.txt.gz')) | |
| def requires(self): | |
| return None | |
| def run(self): |
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 __future__ import print_function | |
| import sys | |
| import io | |
| import pip | |
| import httplib2 | |
| import os | |
| from mimetypes import MimeTypes | |
NewerOlder