Skip to content

Instantly share code, notes, and snippets.

View amad's full-sized avatar

Ahmad Samiei amad

View GitHub Profile
amad /
Created December 2, 2021 20:45 — forked from earljon/
Delete a Route 53 Record Set in AWS CLI
# Make sure that the value of Name, Type, TTL are the same with your DNS Record Set
trait Car {
val doorsNb: Int
override def equals(a: Any) = {
a match {
case c: Car => doorsNb == c.doorsNb
case other => false

Best Practices for Azure Redis

Below are a set of best practices that I recommend for most customers. This information is based on my experience helping hundreds of Azure Redis customers investigate various issues.

Configuration and Concepts

  1. Use Standard or Premium Tier for Production systems. The Basic Tier is a single node system with no data replication and no SLA. Also, use at least a C1 cache. C0 caches are really meant for simple dev/test scenarios since they have a shared CPU core, very little memory, are prone to "noisy neighbor", etc.
  2. Remember that Redis is an In-Memory data store. Read this article so that you are aware of scenarios where data loss can occur.
  3. Configure your client library to use a "connect timeout" of at least 10 to 15 seconds, giving the system time to connect even under higher CPU conditions. If your client or server tend to be under high load
amad /
Last active January 6, 2024 04:07
AWS Well-Architected Framework Checklist

The Well-Architected Framework Checklist

This is the set of questions presented on The Well-Architected Framework whitepaper designed to evaluate how well your architecture is aligned with AWS best practices.

Security Pillar

Data Protection

  • How are you encrypting and protecting your data at rest?
import numpy
import perfplot
setup=lambda n: numpy.random.randint(0, 1000, n),
lambda a: a[::-1],
lambda a: numpy.ascontiguousarray(a[::-1]),
lambda a: numpy.fliplr([a])[0]
import numpy as np
from scipy.signal import find_peaks
from moviepy.editor import VideoFileClip, concatenate
import matplotlib.pyplot as plt
import sys
import argparse
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video", help="path to the video file")
args = vars(ap.parse_args())
amad /
Created July 23, 2018 19:44 — forked from swalkinshaw/
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

amad /
Created May 7, 2018 13:41 — forked from bastman/
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

amad / main.go
Created January 7, 2018 18:53 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (