Skip to content

Instantly share code, notes, and snippets.

View nerdalertdk's full-sized avatar

nerdalertdk nerdalertdk

View GitHub Profile
@nerdalertdk
nerdalertdk / .env.example
Created September 13, 2022 09:15 — forked from GabLeRoux/.env.example
Mount S3 as Docker Volume (docker-compose)
AWS_S3_BUCKET=
AWS_S3_ACCESS_KEY_ID=
AWS_S3_SECRET_ACCESS_KEY=
@nerdalertdk
nerdalertdk / letsencrypt_2016.md
Created April 7, 2017 12:49
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two modes when you don't want Certbot to edit your configuration:

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.

In the following, we're setting up mydomain.com to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.

@nerdalertdk
nerdalertdk / osx-for-hackers.sh
Created October 13, 2016 11:40 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@nerdalertdk
nerdalertdk / beguidcalc.md
Created September 7, 2016 06:21 — forked from Fank/beguidcalc.md
ArmA 3 / DayZ-Standalone - BattlEye GUID calculation

md5("BE" (2 bytes) + 64-bit SteamID (8 bytes))

# HP RAID CHECK
if classe == "VMware_StorageVolume" :
if 'Interim Recovery' in elementName:
verboseoutput("GLobal exit set to CRITICAL")
GlobalStatus = ExitCritical
ExitMsg += " CRITICAL : %s " % elementNameValue

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 400,000 to 500,000 requests per second (clustered), most what i saw is 50,000 to 80,000 (non-clustered) requests per second and 30% CPU load, course, this was 2xIntel Xeon with HT 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.

First, you will need to install nginx, my way to install nginx is compiling it from source, but for now we will use apt-get