Skip to content

Instantly share code, notes, and snippets.

View kabootit's full-sized avatar

Kabootit kabootit

  • Washington D.C.
View GitHub Profile
import * as R from 'ramda';
import { Request, Response } from 'express';
import { StatusCodes } from 'http-status-codes';
import { ExternalAccountNature, ExternalAccountOwnerType } from '../../../lib/cft/externalAccount/types';
import { CFTUrl } from '../../../lib/cft/apiUrls';
import * as CFT from '../../../lib/cft';
import mapErrorMessageToFailureReason from '../../helpers/mapErrorMessageToFailureReason';
import { isLeadOwnedBankAccount, validateBankAccount } from '../../../lib/cft/enrollClient/helpers/enrollmentOperations/createAndValidateBankAccount';
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
ts-sam-test
Sample SAM Template for ts-sam-test
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 10
Runtime: ruby2.7
require 'json'
require 'aws-sdk-dynamodb'
require 'mail'
require 'aws-sdk-ses'
def respond(event:, context:)
event['Records'].each do |record|
ses_client = Aws::SES::Client.new(region: 'us-west-2')
db_client = Aws::DynamoDB::Client.new(region: 'us-west-2')
# Any import from src or main should be done inside setup_and_run function
# importing them here causes mock.patch to fail
import asyncio
import os
from typing import List, TypedDict
from unittest.mock import AsyncMock
from fastapi import testclient
import pytest
from unittest import mock
@kabootit
kabootit / falsehoods-programming-time-list.md
Created January 4, 2025 19:36 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).