Skip to content

Instantly share code, notes, and snippets.

View gist:1731badc6047f86ae3269b774e19c502
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
View gist:fe3362025d4dded2b8a8
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [R=301,L]
## rewrite non www -> www
server {
listen 80;
View gist:d1e89adb2286148fffdc
server {
listen 80;
rewrite ^(.*)$ $scheme://$1;
server {
listen 80 default_server;
View gist:15749ca093d6390bbd27
server {
listen 80;
rewrite ^(.*)$ $scheme://$1;
server {
listen 80 default_server;
mikeyhill / slack.conf
Created Dec 22, 2015 — forked from Nihisil/jail.local
Send notifications to the Slack from fail2ban
View slack.conf
actionstart =
actionstop =
actionban = /bin/bash /etc/fail2ban/ "Banned _country_ <ip> in the jail <name> after <failures> attempts" "<ip>" > /dev/null 2>&1
actionunban = /bin/bash /etc/fail2ban/ "Unbanned _country_ <ip> in the jail <name>" "<ip>" > /dev/null 2>&1
mikeyhill / gist:0e046ab9a3a5216944c9
Created Dec 10, 2015
Javascript, PHP and .htaccess redirect for mobile users
View gist:0e046ab9a3a5216944c9
This is a simple way to redirect based on screen size. This redirect would go at the bottom of your template for the landing page.
<br />
&lt;script&gt;// &lt;![CDATA[<br />
if (screen.width &lt;= 800) {<br />
document.location = &quot;;;<br />
}<br />
// ]]&gt;&lt;/script&gt;<br />
mikeyhill / arch-linux-install
Created Oct 2, 2015 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide ( contains a more verbose description.
# Download the archiso image from
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
View cent6hvm.ks
url --url=
# Firewall configuration
firewall --enabled --service=ssh
repo --name="repo0" --baseurl=
repo --name="repo1" --baseurl=
repo --name="repo2" --baseurl=
mikeyhill /
Last active Aug 29, 2015 — forked from brandonb927/
OSX for Hackers: Yosemite 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...
# Alot of these configs have been taken from the various places
# on the web, most from here
# Set the colours you can use
View gist:ba3055c46a0e63b11fa8
Refreshing Terraform state prior to plan... Refreshing state... (ID: eipalloc-9c64cff9) Refreshing state... (ID: preprod-vpn-server-role:preprod-vpn-server-role-policy) Refreshing state... (ID: preprod-jenkins-server-role) Refreshing state... (ID: ZX6WEG2UUXNTU_memcached_CNAME) Refreshing state... (ID: dev-app-server-role) Refreshing state... (ID: ZX6WEG2UUXNTU_memcached_CNAME) Refreshing state... (ID: vpc-4a0e9a2f) Refreshing state... (ID: preprod-utility-role)