Skip to content

Instantly share code, notes, and snippets.

View thearyanahmed's full-sized avatar

Aryan Ahmed thearyanahmed

View GitHub Profile
@thearyanahmed
thearyanahmed / distance.go
Created November 4, 2022 17:36 — forked from hotdang-ca/distance.go
Golang code to calculate distance between two lat/lng decimal coordinates.
package main
import (
"math"
"fmt"
)
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//::: :::
//::: This routine calculates the distance between two points (given the :::
@thearyanahmed
thearyanahmed / golang_job_queue.md
Created October 27, 2022 15:34 — forked from harlow/golang_job_queue.md
Job queues in Golang

Rough Notes about CQRS and ES

Once upon a time…

I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).

I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).

It seems inevitable to throw Domain Driven Design (DDD) in to the mix.

@thearyanahmed
thearyanahmed / nextjs-deploy.md
Created September 20, 2022 15:25 — forked from jjcodes78/nextjs-deploy.md
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@thearyanahmed
thearyanahmed / latency.txt
Created March 19, 2022 08:35 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@thearyanahmed
thearyanahmed / deployment_guide.md
Created November 29, 2021 02:10 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel
@thearyanahmed
thearyanahmed / main.go
Created June 22, 2021 14:30 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"