type Customer {
id: ID!
email: String!
}
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 https = require('https') | |
| exports.handler = async (event) => { | |
| const sns = event.Records[0].Sns.Message | |
| let color = '' | |
| let message = '' | |
| if (sns.includes('build status is FAILED')) { | |
| color = '#E52E59' | |
| message = 'Release to My Company **production** failed.' | |
| } else if (sns.includes('build status is SUCCEED')) { |
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 { SSM } from "aws-sdk"; | |
| const getParameterWorker = async (name:string, decrypt:boolean) : Promise<string> => { | |
| const ssm = new SSM(); | |
| const result = await ssm | |
| .getParameter({ Name: name, WithDecryption: decrypt }) | |
| .promise(); | |
| return result.Parameter.Value; | |
| } |
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
| AWSTemplateFormatVersion: 2010-09-09 | |
| Parameters: | |
| MailchimpMembersUrl: | |
| Type: String | |
| Default: https://xxx.api.mailchimp.com/3.0/lists/230948/members | |
| MailchimpApiPassword: | |
| Type: String | |
| Default: REPLACEME |
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 AWS = require("aws-sdk"); | |
| const axios = require("axios"); | |
| const url = require("url"); | |
| // grabbing from AWS SAM template, better than hard coding. | |
| const ClientID = process.env.ClientID; | |
| const Secret = process.env.Secret; |
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 string | |
| import re | |
| import nltk | |
| def normalize(text): | |
| # remove punctuation | |
| text = re.sub('[%s]' % re.escape(string.punctuation), '', text) | |
| # split into words | |
| # nltk.data.path.append("/nltk_data") | |
| from nltk.tokenize import word_tokenize |
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
| service: my-api | |
| org: CompanyName | |
| # You can pin your service to only deploy with a specific Serverless version | |
| # Check out our docs for more details | |
| # frameworkVersion: "=X.X.X" | |
| frameworkVersion: '>=2.1.1 <3.0.0' | |
| custom: | |
| defaultStage: dev |
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 s3 = new AWS.S3(); | |
| const mailParser = require('mailparser').simpleParser; | |
| const dateFormat = require('dateformat'); | |
| const path = require('path'); | |
| const config = { | |
| incomingBucket: process.env.INCOMING_BUCKET || 'ldsc-webcam', | |
| incomingPrefix: process.env.INCOMING_PREFIX || 'incoming/', | |
| outgoingBucket: process.env.OUTGOING_BUCKET || 'ldsc-webcam', |
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
| { | |
| "Comment": "A Hello World example of the Amazon States Language using Pass states", | |
| "StartAt": "Create pending order", | |
| "States": { | |
| "Create pending order": { | |
| "Type": "Pass", | |
| "Next": "Select Payment Method" | |
| }, | |
| "Select Payment Method": { | |
| "Type": "Choice", |
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
| /* eslint-disable no-undef, react/prop-types */ | |
| import React from 'react'; | |
| import { css } from 'react-emotion'; | |
| import { Box, Flex } from '../../components/Layout'; | |
| import colors from '../../utils/colors'; | |
| import ButtonPrimary from '../../components/Buttons'; | |
| const input = css` | |
| display: block; | |
| box-sizing: border-box; |
NewerOlder