Skip to content

Instantly share code, notes, and snippets.

View eoinsha's full-sized avatar

Eoin Shanaghy eoinsha

View GitHub Profile
@lmammino
lmammino / Cargo.toml
Last active February 22, 2022 19:37
Decode an EU DGC (greenpass) in Rust
[package]
name = "dgc-decode"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
base45 = "3.0.0"
ciborium = "0.2.0"
@samjarrett
samjarrett / paginate.py
Created June 11, 2021 12:51
boto paginators the right way
def paginate(method, **kwargs):
client = method.__self__
paginator = client.get_paginator(method.__name__)
for page in paginator.paginate(**kwargs).result_key_iters():
for result in page:
yield result
# usage:
import boto3
@marcogrcr
marcogrcr / sigv4_using_http_client.py
Last active April 19, 2024 03:03
Send request with SigV4 in python using boto3
from boto3.session import Session
from botocore.auth import SigV4Auth
from botocore.awsrequest import AWSRequest
from botocore.credentials import Credentials
from http.client import HTTPConnection, HTTPSConnection
import json
import os
from urllib.parse import urlparse
def sigv4_request(
@jbesw
jbesw / gist:08469b18bc45eed1f4b2c0783d132f5d
Last active July 22, 2022 08:19
EventBridge Rule for Logging to CloudWatch Logs
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: EventBridge Rule Test
Resources:
CFNLogGroup:
Type: AWS::Logs::LogGroup
Properties:
RetentionInDays: 3
LogGroupName: '/aws/events/eventbridgeLog'
---
Resources:
Api:
Type: 'AWS::ApiGatewayV2::Api'
Properties:
Name: !Ref 'AWS::StackName'
ProtocolType: WEBSOCKET
RouteSelectionExpression: '\$default'
DefaultRoute:
Type: 'AWS::ApiGatewayV2::Route'
@pkazi
pkazi / cloudTrailEventNames.list
Last active March 23, 2024 09:37
List of values for parameter EventName in AWS Cloudtrail events
AbortDocumentVersionUpload
AbortEnvironmentUpdate
AbortMultipartUpload
AbortVaultLock
AcceptAccountMapping
AcceptCertificateTransfer
AcceptDelegate
AcceptDirectConnectGatewayAssociationProposal
AcceptFxPaymentCurrencyTermsAndConditions
AcceptHandshake
@alexcasalboni
alexcasalboni / serverless-resources.yml
Created January 4, 2018 20:51
Serverless Resources sample for Amazon Cognito IdentityPool
Resources:
WorkshopKinesisStream:
Type: "AWS::Kinesis::Stream"
Properties:
ShardCount: 1
IdentityPool:
Type: "AWS::Cognito::IdentityPool"
Properties:
IdentityPoolName: WorkshopIdentityPool

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a

Quimby

Quimby is Walmart's service layer for mobile clients' configuration, CMS, a-b testing setup, and a few other sundry related services. It stitches together a constellation of data sources into a concise menu of API calls that mobile clients make to intialize and configure themselves.

Quimby is a REST service layer based upon the Gogo micro-service framework that we in turn built with Node.js, Hapi, Zookeeper, and Redis. Gogo is able to expose an array of web servers as a single host, and offers the ability to isolate tasks into smaller focused processes, emphasizing scalability and failure recovery. For example, a failure in any micro-service will not affect the life cycle of a request. Gogo also offers the additional features required to build distributed services with shared state, such as leader election.

Quimby components

  • Penny (part of Gogo) - The micro-service router, responsible for pairing a request with a servicer
@thoop
thoop / nginx.conf
Last active December 8, 2023 21:55
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;