Skip to content

Instantly share code, notes, and snippets.

View russomi's full-sized avatar
☁️
Remote

Michael Russo russomi

☁️
Remote
View GitHub Profile
@FeepingCreature
FeepingCreature / youre_doing_json_apis_wrong.md
Last active January 7, 2024 19:33
You Are Doing JSON APIs Wrong

You are doing JSON APIs wrong.

When you use JSON to call an API - not a REST API, but something like JSON-RPC - you will usually want to encode one of several possible messages.

Your request body looks like this:

{
 "type": "MessageWithA",
@AHaydar
AHaydar / main.tf
Created April 22, 2022 14:16
Terraform example for DynamoDB table, Lambda, and IAM to allow the Lambda to scan the table
provider "aws" {
profile = "default"
region = "ap-southeast-2"
}
module "company_table" {
source = "terraform-aws-modules/dynamodb-table/aws"
name = "company"
@Widdershin
Widdershin / ssr.md
Last active May 1, 2024 17:36
The absurd complexity of server-side rendering

In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.

After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.

But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.

And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?

In dark rooms, in hushed tones, we speak of colours.

@sergeyzenchenko
sergeyzenchenko / russia-ddos.md
Last active April 16, 2024 15:32
Russia DDOS list
import logging
import yaml
import os
from kafka import KafkaProducer
from datetime import datetime
class fileTransfer:
def __init__(self):
@russomi
russomi / cli.py
Created November 11, 2021 17:06 — forked from mivade/cli.py
Using a decorator to simplify subcommand creation with argparse
from argparse import ArgumentParser
cli = ArgumentParser()
subparsers = cli.add_subparsers(dest="subcommand")
def argument(*name_or_flags, **kwargs):
"""Convenience function to properly format arguments to pass to the
subcommand decorator.
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@russomi
russomi / README.md
Last active April 5, 2022 03:30
Java 8 Spring Event Driven Microservices

Event Driven Microservices

  • Java 8
  • Spring Boot 2
  • JUnit
  • Cucumber
  • Kafka
  • Camunda
  • ElasticSearch
  • Cassandra
@russomi
russomi / GitOps.md
Last active April 16, 2021 20:58
Links to GitOps resources

Deploying Applications Using GitOps

GitOps - An operating model for building cloud native applications

Overview

  • GitOps is a way to do Kubernetes cluster management and application delivery.
  • Use of the Git version control system to track and approve changes to the infrastructure and runtime environment of applications.
  • The term "GitOps" was popularized in 2017 by Alexis Richardson of Weaveworks[[1]].
  • Developer-centric experience for managing applications and infrastructure.