This file contains 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
ERROR_HELP_STRINGS = { | |
# Common Errors | |
'InternalServerError': 'Internal Server Error, generally safe to retry with exponential back-off', | |
'ProvisionedThroughputExceededException': 'Request rate is too high. If you\'re using a custom retry strategy make sure to retry with exponential back-off.' + | |
'Otherwise consider reducing frequency of requests or increasing provisioned capacity for your table or secondary index', | |
'ResourceNotFoundException': 'One of the tables was not found, verify table exists before retrying', | |
'ServiceUnavailable': 'Had trouble reaching DynamoDB. generally safe to retry with exponential back-off', | |
'ThrottlingException': 'Request denied due to throttling, generally safe to retry with exponential back-off', | |
'UnrecognizedClientException': 'The request signature is incorrect most likely due to an invalid AWS access key ID or secret key, fix before retrying', | |
'ValidationException': 'The input fails to satisfy the con |
This file contains 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
pymysql |
This file contains 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 puppeteer = require('puppeteer'); | |
(async () => { | |
let proxies = [ | |
'', | |
'159.89.191.89:8080' | |
]; | |
let urls = [ | |
'', |
This file contains 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 | |
ECR_REGION='us-east-1' | |
ECR_REPO='YOUR_REPO_GO_HERE' | |
IMAGES_TO_DELETE=$( aws ecr list-images --region $ECR_REGION --repository-name $ECR_REPO --filter "tagStatus=UNTAGGED" --query 'imageIds[*]' --output json ) | |
if [ "$IMAGES_TO_DELETE" == [] ] | |
then |
This file contains 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://futuramaapi.herokuapp.com/ | |
https://thesimpsonsquoteapi.glitch.me/ | |
https://api.chucknorris.io/ | |
https://rickandmortyapi.com/ | |
https://catfact.ninja/ |
This file contains 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
sudo apt update | |
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - | |
echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list | |
sudo apt update | |
sudo apt -y install telegraf |
This file contains 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 json | |
import boto3 | |
from datetime import datetime | |
def lambda_handler(event, context): | |
dynamodb = boto3.resource('dynamodb') | |
client = boto3.client('dynamodb') | |
queryStringParameters = event.get("queryStringParameters", {}) | |
list_items = queryStringParameters.get("list_items", "false") |
This file contains 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
// ----> Design Principles | |
// DRY | |
// 0 | |
console.log("Don’t Repeat Yourself"); | |
// 1 | |
console.log("Encapsulate What Varies"); |
This file contains 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 thecodingmachine/php:7.4-v3-cli-node10 | |
LABEL authors="Julien Neuhart <[email protected]>, David Négrier <[email protected]>" | |
USER root | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends gnupg && \ | |
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ | |
apt-get update && \ |
This file contains 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 mysql = require('mysql-library'); | |
const mysql = { | |
createConnection: () => { | |
return { | |
query: (query) => { | |
return query; | |
} | |
} | |
} | |
}; |