Skip to content

Instantly share code, notes, and snippets.

View efimk-lu's full-sized avatar

Efi Merdler-Kravitz efimk-lu

View GitHub Profile

General

We don't have QA which means quality is dependent only on us. Use the following list to verify that the end result that is being pushed to production is in high quality

While designing

✔ Are we going to break backward compatibility? If so then raise a flag

✔ What are the cost estimations of the feature?

✔ Error handling (exceptions, timeouts, retries) when using streams as lambda inputs

✔ DynamoDB Resources

@efimk-lu
efimk-lu / authentication-example.js
Last active November 25, 2022 14:11
Using Cognito in integration tests
const CognitoIdentityServiceProvider = require("amazon-cognito-identity-js");
// Required in order to use the cognito js library to work.
global.fetch = require("node-fetch");
/**
* Authenticate a cognito user and return its authentication token. Use the auth token in the authorization header
* @param callback Callback function with error as first param and the actual user token in the second param.
*/
function authenticateUser(callback) {
@efimk-lu
efimk-lu / deploy.sh
Created April 3, 2019 14:08
Deployment script
#!/usr/bin/env bash
set -eo pipefail
bold=$(tput bold 2>/dev/null || true)
normal=$(tput sgr0 2>/dev/null || true)
echo ".____ .__ .__ ";
echo "| | __ __ _____ |__| ____ ____ |__| ____ ";
echo "| | | | \/ \| |/ ___\ / _ \ | |/ _ \ ";
echo "| |___| | / Y Y \ / /_/ > <_> ) | ( <_> )";
@efimk-lu
efimk-lu / .config.yml
Created April 3, 2019 13:39
CircleCI configuration
version: 2.1
defaults: &defaults
working_directory: ~/<repo-name>
docker:
- image: circleci/python:3.7
commands:
checkout_utils:
description: "Checkout utils"
steps:
@efimk-lu
efimk-lu / .pre-commit-config.yaml
Last active April 3, 2019 13:36
Pre-commit hooks
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.7
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.660
hooks: