Skip to content

Instantly share code, notes, and snippets.

# Add this to the YAML section:
ansible_ssh_port: 1234
@ChrisMcKee
ChrisMcKee / installnginx.sh
Last active August 29, 2015 14:03
Install NGINX on CENTOS from source
#!/bin/bash
### VARIABLES ###
PRE_PACK="gcc gcc-c++ make pcre-devel zlib-devel unzip wget htop"
OPT_PACK="openssl-devel"
VER="1.6.2"
USER="nginx"
GROUP="nginx"
INSTALL_DIR="/etc/nginx"
PROG_NAME="nginx"
@ChrisMcKee
ChrisMcKee / updatehaproxy.sh
Last active August 29, 2015 14:03
Upgrade Src Install of HAProxy
#!/bin/bash
### VARIABLES ###
PRE_PACK="openssl-devel pcre-devel make gcc"
VER="1.5.1"
# Setup Colours
black='\E[30;40m'
red='\E[31;40m'
@ChrisMcKee
ChrisMcKee / InstallHaProxy.sh
Created June 26, 2014 14:08
Centos 6.5 Install HAProxy From Source (1.5.1 release pre configured). chmod +x InstallHaProxy.sh then ./InstallHaProxy.sh
#!/bin/bash
### VARIABLES ###
PRE_PACK="openssl-devel pcre-devel make gcc"
VER="1.5.1"
# Setup Colours
black='\E[30;40m'
red='\E[31;40m'
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
#! /bin/sh
##
# Generated by Chef
# <%= Time.now %>
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
@ChrisMcKee
ChrisMcKee / nginx
Created April 8, 2014 01:20
Ubuntu NGINX Init.d
#!/bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@ChrisMcKee
ChrisMcKee / update-openssl-heartbleedpath.sh
Last active August 29, 2015 13:58
Install openssl from source for Heatbleed patch
echo "Installing OpenSSL"
yum -y -q install gcc gcc-c++ make pcre-devel zlib-devel unzip wget > /dev/null
mkdir -p /src
cd /src
# download openssl centos 6.x
wget -cnv --progress=bar http://www.openssl.org/source/openssl-1.0.1g.tar.gz
tar xvzf openssl-1.0.1g.tar.gz