Skip to content

Instantly share code, notes, and snippets.

@sasankmukkamala
sasankmukkamala / ddb-kinesis-lambda.py
Created April 6, 2019 20:51
Send Existing Data from Dynamodb to AWS Lambda via Kinesis by scanning entire table.
import boto3
import boto3.dynamodb.types
import json
# Load the service resources in the desired region.
session = boto3.Session(profile_name='default')
dynamodb = session.resource('dynamodb', region_name="ap-south-1")
kinesis = session.client('kinesis', region_name="ap-south-1")
# Set names for ddb table and ks stream
@wojteklu
wojteklu / clean_code.md
Last active June 17, 2024 12:40
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@kbastani
kbastani / microservices.adoc
Last active September 21, 2022 14:39
Using Graph Analysis to Design Microservice Architectures in the Cloud

Using Graph Analysis to Design Microservice Architectures in the Cloud

This interactive Neo4j graph tutorial covers how to use graph analysis to find software modules that are highly centralized, making good candidates to be decomposed into microservices.


@chbaranowski
chbaranowski / EchoTest.java
Created December 10, 2011 12:37
Cheat Sheet Test for Mockito
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;
import static org.mockito.Mockito.*;
import static org.mockito.BDDMockito.*;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;