Skip to content

Instantly share code, notes, and snippets.

View evindunn's full-sized avatar

Evin Dunn evindunn

  • Zoom Video Communications
  • Flagstaff, AZ
View GitHub Profile
@evindunn
evindunn / rate-limit-test.py
Last active June 25, 2021 16:15
rate-limit-test.py
#!/usr/bin/env python3
import requests
import time
from sys import argv
from threading import Thread
URL = argv[-1]
def worker(i, url):
@evindunn
evindunn / logger.js
Last active June 7, 2020 08:25
NodeJS Winston Logger
const winston = require("winston");
const winstonFmt = winston.format;
const TIMESTAMP_FMT = "YYYY-MM-DD HH:mm:ss";
const NANOS_IN_MILLI = BigInt(1e6);
const LOG_LEVEL = process.env.LOG_LEVEL || "warn";
const LOG_LEVELS = {
levels: {
error: 0,
@evindunn
evindunn / Dockerfile
Created April 28, 2020 15:28
Sending emails from PHP container
FROM php:7-fpm
RUN apt-get update && \
apt-get install -y \
msmtp-mta \
&& \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN printf 'host my.smtp.server\n' > /etc/msmtprc