Skip to content

Instantly share code, notes, and snippets.

View johnpyp's full-sized avatar

johnpyp

  • Amazon
  • Seattle, WA
  • 16:18 (UTC -07:00)
View GitHub Profile
@manzt
manzt / my-ts-monorepo.md
Last active June 7, 2024 06:56
A minimal setup for TypeScript monorepo libraries

My Minimal TypeScript Monorepo Setup for ESM Libraries

After a deep dive looking up best practices for TypeScript monorepos recently, I couldn't find anything that suited my needs:

  1. Publish individual (typed) packages to NPM with minimal config.
  2. Supports fast unit testing that spans the entire project (e.g., via Vitest)
  3. Ability to have an interactive playground to experiment with the API in a real-time (e.g., via Vite)

Most solutions point to TypeScript project references,

@CHSuworatrai
CHSuworatrai / VMware vSphere 6.x Licence Keys
Created April 8, 2021 09:20 — forked from DVSB/VMware vSphere 6.x Licence Keys
VMware vSphere 6 and 7 Licence Keys
VMware vSphere 6 Enterprise Plus
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
VMware vSphere with Operations Management 6 Enterprise
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
@williamdes
williamdes / ACME-SH-docker-compose.md
Last active July 10, 2024 09:35 — forked from Dreamacro/ACMESH.md
acme.sh using docker-compose

How to use

$ docker compose -f acmesh.yaml up -d

.env

ACME_HOME_DIR=./acme.sh
@colinmcintosh
colinmcintosh / ubuntu_nginx_acmesh_cloudflare
Last active March 4, 2024 15:29
Configure Ubuntu 18.04 for NGINX with LetsEncrypt including auto-renewal using Acme.sh and Cloudflare API Tokens
sudo apt update
sudo apt upgrade -y
sudo apt install nginx
sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
# Create a folder to store your certs
mkdir -p /etc/nginx/ssl
# Edit NGINX config for your site
# If you need a TLS secured NGINX config look at https://gist.github.com/colinmcintosh/25425fccbde0a5bdc9df1153bd94b665
@chazlarson
chazlarson / sa-batch-syncer.sh
Created May 28, 2019 17:18
Sync two rclone remotes, cycling through a set of service accounts at 500GB each. Assumptions here are: you have 100 service accounts. Their JSON credential files are named `sa-1.json` through `sa-100.json` and are stored in `/opt/sa-json`.
#!/bin/bash
COUNTER=1
SOURCE="remote:path"
DESTINATION="remote:path"
JSON_LOC="/opt/sa-json"
while [ $COUNTER -lt 100 ]; do
echo Using service account sa-$COUNTER
/usr/bin/rclone sync -v --delete-excluded \
--fast-list --checkers=32 --transfers=16 --max-transfer 500G \
--stats 5s --drive-service-account-file=$JSON_LOC/sa-$COUNTER.json \
[user]
email = john.smith@gmail.com
name = John Smith
[push]
default = simple
[alias]
co = checkout
ci = commit
czp = cz && git pu
st = status
-Xmn768m -Xmx6000M -Xms512M -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseNUMA -XX:+CMSParallelRemarkEnabled -XX:MaxTenuringThreshold=15 -XX:MaxGCPauseMillis=30 -XX:GCPauseIntervalMillis=150 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:+UseBiasedLocking -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -Dfml.ignorePatchDiscrepancies=true -Dfml.ignoreInvalidMinecraftCertificates=true -XX:+UseFastAccessorMethods -XX:+UseCompressedOops -XX:+OptimizeStringConcat -XX:+AggressiveOpts -XX:ReservedCodeCacheSize=2048m -XX:+UseCodeCacheFlushing -XX:SoftRefLRUPolicyMSPerMB=10000 -XX:ParallelGCThreads=10
@denji
denji / nginx-tuning.md
Last active July 20, 2024 17:33
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.