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
| #set($id = $util.autoId()) | |
| #set($pk = "PRODUCT#$id") | |
| { | |
| "version" : "2018-05-29", | |
| "operation" : "PutItem", | |
| "key" : { | |
| "PK" : $util.dynamodb.toDynamoDBJson($pk), | |
| "SK" : $util.dynamodb.toDynamoDBJson($pk) | |
| }, | |
| "attributeValues" : $util.dynamodb.toMapValuesJson($ctx.args.input) |
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 { CfnResolver } from '@aws-cdk/aws-appsync' | |
| import { IConstruct } from '@aws-cdk/core' | |
| interface IAspect { | |
| visit: (node: IConstruct) => void | |
| } | |
| class EnforceAppSyncResolverNaming implements IAspect { | |
| visit (node: IConstruct): void { | |
| if (node instanceof CfnResolver) node.overrideLogicalId(`${node.typeName}${node.fieldName}Resolver`) |
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
| #!/bin/bash | |
| PIDFILE=$2 | |
| SCRIPT=$1 | |
| if [ -f $PIDFILE ] | |
| then | |
| PID=$(cat $PIDFILE) | |
| ps -p $PID > /dev/null 2>&1 | |
| if [ $? -eq 0 ] | |
| then |
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
| [program:sqs-alertify] | |
| command=python3 /Project/Path/sqsnotify/main.py | |
| autostart=true | |
| autorestart=true | |
| numprocs=1 | |
| redirect_stderr=true | |
| stdout_logfile=/Project/Path/sqsnotify/sqs_alertify.log | |
| [supervisord] |
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 boto3 | |
| import subprocess | |
| # Get the sqs resource | |
| sqs = boto3.resource('sqs') | |
| # Get the queue | |
| queue = sqs.get_queue_by_name(QueueName='Alertify') | |
| # endless loop |
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 { BrowserModule } from '@angular/platform-browser'; | |
| import { NgModule } from '@angular/core'; | |
| import { FormsModule } from '@angular/forms'; | |
| import { AppComponent } from './app.component'; | |
| import { HttpClientModule } from '@angular/common/http'; | |
| @NgModule({ | |
| declarations: [ |
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 {Component, ElementRef, ViewChild} from '@angular/core'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) | |
| export class AppComponent { | |
| acceptedMimeTypes = [ |
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
| export const environment = { | |
| production: false, | |
| apiUrl: <your api url> // i.e.'https://beepboop.execute-api.us-west-2.amazonaws.com/Prod' | |
| }; |
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
| const AWS = require('aws-sdk'); | |
| const fileType = require('file-type'); | |
| const config = new AWS.Config({ | |
| accessKeyId: process.env.ACCESS_KEY_ID, | |
| secretAccessKey: process.env.SECRET_ACCESS_KEY, | |
| region: process.env.REGION | |
| }); | |
| AWS.config.update(config); |
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 {Component, ElementRef, ViewChild} from '@angular/core'; | |
| import {HttpClient} from '@angular/common/http'; | |
| import {environment} from '../environments/environment'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) | |
| export class AppComponent { |
NewerOlder