Skip to content

Instantly share code, notes, and snippets.

@grandcat
grandcat / nginx.conf
Last active Jan 25, 2017 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@grandcat
grandcat / mcp23017_scan_matrix.py
Last active Oct 27, 2016
Scans a button matrix of an old Internet radio. Only for debugging.
View mcp23017_scan_matrix.py
import wiringpi
pin_base = 65
i2c_addr = 0x20
#pins = [65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80]
ROWS = range(68, 68 + 4)
def initialize():
# Set all out pins to 0 (prevent floating)
for pin in ROWS:
You can’t perform that action at this time.