Skip to content

Instantly share code, notes, and snippets.

@tech-nova
tech-nova / haproxy.cfg
Created June 12, 2016 09:05 — forked from rnewson/haproxy.cfg
haproxy.cfg stanzas to enable Perfect Forward Secrecy and HTTP Strict Transport Security. Requires OpenSSL 1.0.1g or so.
# Bind SSL port with PFS-enabling cipher suite
bind :443 ssl crt path_to_certificate no-tls-tickets ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-RC4-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES128-SHA:AES256-SHA256:AES256-SHA:RC4-SHA
# Distinguish between secure and insecure requests
acl secure dst_port eq 443
# Mark all cookies as secure if sent over SSL
rsprep ^Set-Cookie:\ (.*) Set-Cookie:\ \1;\ Secure if secure
# Add the HSTS header with a 1 year max-age
@tech-nova
tech-nova / xss-owasp-cheatsheet
Created February 14, 2016 21:38 — forked from sseffa/xss-owasp-cheatsheet
xss-owasp-cheatsheet
#
# https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
# based on the RSnake original http://ha.ckers.org/xss.html
# Retrieved on 2013-11-20
# Much of this wildly obsolete
#
# XSS Locator 2
'';!--"<XSS>=&{()}
@tech-nova
tech-nova / xfdf.php
Created December 4, 2015 14:09 — forked from collegeman/xfdf.php
Generate xFDF in PHP
<?php
/*
KOIVI HTML Form to FDF Parser for PHP (C) 2004 Justin Koivisto
Version 1.1
Last Modified: 2010-02-17
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
@tech-nova
tech-nova / www.wp-kickstart.com.conf
Last active August 29, 2015 14:28 — forked from tomazzaman/www.wp-kickstart.com.conf
wp-kickstart.com Nginx vhost config
server {
include /home/webmaster/www/www.wp-kickstart.com.conf;
server_name www.wp-kickstart.com;
listen 443 ssl spdy;
server_tokens off;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
@tech-nova
tech-nova / hhvm.conf
Last active August 29, 2015 14:28 — forked from tomazzaman/hhvm.conf
Monit configurations for commonly used services
check process hhvm with pidfile /var/run/hhvm/pid
group hhvm
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds
stop program = "/usr/sbin/service hhvm stop"
if failed unixsocket /var/run/hhvm/hhvm.sock then restart
if mem > 400.0 MB for 1 cycles then restart
if 5 restarts with 5 cycles then timeout