Skip to content

Instantly share code, notes, and snippets.

@dragonbk91
dragonbk91 / web-servers.md
Created October 21, 2020 04:34 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@dragonbk91
dragonbk91 / nginx-tuning.md
Created September 25, 2020 07:38 — forked from denji/nginx-tuning.md
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.

@dragonbk91
dragonbk91 / keybase.md
Created September 14, 2019 15:16
keybase.md

Keybase proof

I hereby claim:

  • I am dragonbk91 on github.
  • I am quangzt (https://keybase.io/quangzt) on keybase.
  • I have a public key ASCiDC8ev1M8JdzDq8YqVDKRMD6jY5_28UTW5TFaNbrtNQo

To claim this, I am signing this object:

@dragonbk91
dragonbk91 / start-stop-example.sh
Created September 27, 2018 09:14 — forked from alobato/start-stop-example.sh
start-stop-example
#!/bin/sh
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh
set -e
# Must be a valid filename
NAME=foo
PIDFILE=/var/run/$NAME.pid
#This is the command to be run, give the full pathname
DAEMON=/usr/local/bin/bar