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 blockEmailList = [ | |
'0-mail.com', | |
'027168.com', | |
'0815.ru', | |
'0815.ry', | |
'0815.su', | |
'0845.ru', | |
'0box.eu', | |
'0clickemail.com', | |
'0n0ff.net', |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: YOUR_PROJECT_NAME | |
namespace: eks-test | |
labels: | |
app: YOUR_PROJECT_NAME | |
spec: | |
replicas: 2 | |
strategy: |
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
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
- set -e | |
- echo - Set parameters | |
- AWS_DEFAULT_REGION=YOUR_REGION | |
- AWS_ACCOUNT_ID=YOUR_ACCOUNT_ID | |
- REGISTRY_NAME=YOUR_REGISTRY_NAME | |
- EKS_ROLE_ARN=YOUR_EKS_ROLE_ARN |
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 Twit = require('twit'); | |
var T = new Twit({ | |
consumer_key: '...', | |
consumer_secret: '...', | |
access_token: '...', | |
access_token_secret: '...', | |
timeout_ms: 60 * 1000, // optional HTTP request timeout to apply to all requests. | |
}); |
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 aptRegex = /(apt|bldg|dept|fl|hngr|lot|pier|rm|ste|slip|trlr|unit|#)\.? *[a-z0-9-]+\b/gi; | |
const poBoxRegex = /P\.? ?O\.? *Box +\d+/gi; | |
const roadRegex = /(street|st|road|rd|avenue|ave|drive|dr|loop|court|ct|circle|cir|lane|ln|boulevard|blvd|way)\.?\b/gi; | |
export const creditCardNumber = /\d{4}[ -]?\d{4}[ -]?\d{4}[ -]?\d{4}|\d{4}[ -]?\d{6}[ -]?\d{4}\d?/g; | |
export const streetAddress = new RegExp( | |
'(\\d+\\s*(\\w+ ){1,2}' + roadRegex.source + '(\\s+' + aptRegex.source + ')?)|(' + poBoxRegex.source + ')', | |
'gi' | |
); | |
export const zipcode = /\b\d{5}\b(-\d{4})?\b/g; |
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
# Do not change version. This is the version of aws buildspec, not the version of your buldspec file. | |
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
nodejs: 12 | |
commands: | |
- echo Installing Mocha... | |
- npm install -g mocha |
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
# Do not change version. This is the version of aws buildspec, not the version of your buldspec file. | |
# BUILD_ENV = dev / prod (Check on Build projects ENV. section) | |
# BUCKET_NAME = dev.domain.com / prod.domain.com (Check on Build projects ENV. section) | |
# APPLICATION_NAME = If you store dist/APPLICATION_NAME then replace with the APPLICATION_NAME | |
version: 0.2 | |
phases: | |
install: | |
runtime-versions: |
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
/** | |
* Delete this comment when you deploy the code. | |
* Step 1: Create a folder in your application at root leve | |
* : .platform/nginx/conf.d/proxy.conf | |
* Step 2: Write a single line as below: | |
* Reference: Difference b/w Linux 1 and Linux 2 - https://stackoverflow.com/questions/62924523/configuring-nginx-client-max-body-size-on-elastic-beanstalk-node | |
**/ | |
client_max_body_size 100M; |
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
{ | |
"env": { | |
"node": true, | |
"es6": true | |
}, | |
"ecmaFeatures": { | |
"arrowFunctions": true, | |
"blockBindings": true, | |
"classes": true, | |
"defaultParameters": true, |
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://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SNS.html#deleteEndpoint-property | |
var AWS = require('aws-sdk'); | |
AWS.config.update({ | |
accessKeyId: '', | |
secretAccessKey: '', | |
region: '' | |
}); |
NewerOlder