Skip to content

Instantly share code, notes, and snippets.

View Arp-G's full-sized avatar
🎯
Focusing

Arpan Ghoshal Arp-G

🎯
Focusing
View GitHub Profile
@rbishop
rbishop / README.md
Last active April 26, 2022 15:38
A super simple Elixir server for sending Server Sent Events to the browser.

Generate a new Elixir project using mix and add cowboy and plug as dependencies in mix.exs:

  defp deps do
    [
      {:cowboy, "~> 1.0.0"},
      {:plug, "~> 0.8.1"}
    ]
  end
@petelacey
petelacey / Dockerfile
Last active June 13, 2024 16:47
Docker Compose setup for Elixir, Phoenix, and Postgres
FROM elixir:latest
# Install debian packages
RUN apt-get update && \
apt-get install --yes build-essential inotify-tools postgresql-client git && \
apt-get clean
ADD . /app
# Install Phoenix packages
@ks2211
ks2211 / Phoenix esbuild with Tailwind and Fontawesome
Last active January 31, 2024 05:08
Phoenix with esbuild, fortawesome, and tailwindcss
Phoenix esbuild with Tailwind+Fontawesome
@PJUllrich
PJUllrich / big-o.md
Last active June 28, 2024 20:25
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements
@Arp-G
Arp-G / multipart_s3_upload.js
Created June 18, 2022 08:38
Multipart upload to S3
import fs from 'fs';
import { Buffer } from 'node:buffer';
import {
S3Client,
CreateMultipartUploadCommand,
UploadPartCommand,
CompleteMultipartUploadCommand
} from '@aws-sdk/client-s3';
// 100 MB chunk/part size