Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Niemi's full-sized avatar

Aleksei Niemi

View GitHub Profile
@Niemi
Niemi / lsof
Created August 29, 2012 06:58
lsof check
lsof -n -p {procpid}
@Niemi
Niemi / gist:d434f2b94566796a4502
Last active September 16, 2015 10:05 — forked from dannysheehan/gist:9d67adb67eeef6ad1413
haproxy.cfg configuration for 1Gb KVM with 1 CPU with backend NGINX and percona /mariadb cluster.
#---------------------------------------------------------------------------
# @(#)$Id$
#title :/etc/haproxy/haproxy.cfg
#description :ftmon cluster haproxy config. NGINX and XtraDB Cluster backend
#author :Danny W Sheehan
#date :July 2014
#website :ftmon.org
#
# This is a work in progress. A lot of trial and error and man hours have
# gone into this configuration. I have referenced sources that have been
@Niemi
Niemi / gist:25cee1ff594de7e9e05c
Last active September 16, 2015 10:01 — forked from dannysheehan/gist:d26067dcc3599c4226aa
/etc/nginx/common/nginx.conf basic NGINX location rules common to all website platforms. Should be included in all virtual site configurations.
#---------------------------------------------------------------------------
# @(#)$Id$
#title :/etc/nginx/common/nginx.conf
#description :ftmon cluster nginx common config for all sites.
#author :Danny W Sheehan
#date :July 2014
#website :ftmon.org
#
# This is a work in progress. A lot of trial and error and man hours have
# gone into this configuration. I have referenced sources that have been
#---------------------------------------------------------------------------
# @(#)$Id$
#title :/etc/nginx/common/wpcommon.conf
#description :ftmon cluster nginx common configurations for Wordpress.
#author :Danny W Sheehan
#date :July 2014
#website :ftmon.org
#
# This is a work in progress. A lot of trial and error and man hours have
# gone into this configuration. I have referenced sources that have been
#!/bin/bash
#must be url where i get it (thanks to Author)
# Info
# ---
# script can run with the domain as a command line input
# `sudo ./nginx_domain.sh my_domain.com` or without and
# the script will prompt the user for input
#config
web_root='/usr/share/nginx/'
# https://gist.github.com/gretel/f458cfcfc63850c3d3f5
#
# $OpenBSD: sysctl.conf,v 1.58 2014/07/11 16:43:07 henning Exp $
#
# This file contains a list of sysctl options the user wants set at
# boot time. See sysctl(3) and sysctl(8) for more information on
# the many available variables.
#
net.inet.ip.forwarding=1 # 1=Permit forwarding (routing) of IPv4 packets
#net.inet.ip.mforwarding=1 # 1=Permit forwarding (routing) of IPv4 multicast packets
pki mail.jitter.local certificate "/etc/ssl/mail.jitter.local.crt"
pki mail.jitter.local key "/etc/ssl/private/mail.jitter.local.key"
pki mail.jitter.eu certificate "/etc/ssl/mail.jitter.eu.crt"
pki mail.jitter.eu key "/etc/ssl/private/mail.jitter.eu.key"
queue encryption key "singthesongofthecredentialspostedtogithublalala"
queue compression
expire 6d
@Niemi
Niemi / nginx.conf
Last active August 29, 2015 14:17 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@Niemi
Niemi / tomcat.sh
Last active August 29, 2015 14:10 — forked from MikeN123/tomcat.sh
#!/bin/sh
#
# /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine
#
# Modified init-Script from Ubuntu Tomcat init-script
#
# 2010 - Sebastian Mogilowski - http://www.mogilowski.net/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/
# 2012 - Collin Peters - Added debug option
#
### BEGIN INIT INFO
@Niemi
Niemi / tomcat.sh
Last active August 29, 2015 14:10 — forked from collinpeters/tomcat.sh
#!/bin/sh
#
# /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine
#
# Modified init-Script from Ubuntu Tomcat init-script
#
# 2010 - Sebastian Mogilowski - http://www.mogilowski.net/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/
# 2012 - Collin Peters - Added debug option
#
### BEGIN INIT INFO