Skip to content

Instantly share code, notes, and snippets.

View ivamluz's full-sized avatar

Ivam Luz ivamluz

  • Appnovation
  • Campinas
View GitHub Profile
@mboersma
mboersma / yaml2json
Last active July 31, 2023 12:34
YAML to JSON one-liner
python3 -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))'
@delbetu
delbetu / function_structure.md
Last active February 11, 2024 17:28
Uncle Bob best practices function structure

Intro

  • function signature should be small- the fewer the arguments the better
  • what types should be passed into those arguments
  • why switch and if cost such harm in the software structure ? -> how to get rid of them ?
  • why assign operator is consider harmful ?
  • Many software problems can be avoided by constraining state changing operators, and side effects.
  • How to structure our functions making error handling clean and maintainable fashion ?

Function arguments

@danilop
danilop / template.yaml
Last active February 29, 2024 12:50
Sample AWS SAM Template using Provisioned Concurrency with Application Auto Scaling
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Sample SAM Template using Application Auto Scaling + Provisioned Concurrency
Globals:
Function:
Timeout: 30