Skip to content

Instantly share code, notes, and snippets.

Kingsley Felix iamkingsleyf

View GitHub Profile
petemcw / my.cnf
Created Feb 25, 2011
Ubuntu MySQL 5.1 Configuration - 4GB RAM, Heavy InnoDB
View my.cnf
# The MySQL database server configuration file.
# DESC: InnoDB mainly, heavy queries, fewer connections, 4GB RAM
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
port = 3306
socket = /var/run/mysqld/mysqld.sock
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
View www.conf
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
; Per pool prefix
; It only applies on the following directives:
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
evansolomon / gist:2274120
Created Apr 1, 2012
nginx WordPress multisite config
View gist:2274120
server {
listen 80 default_server;
server_name *;
root /srv/www/;
access_log /srv/www/;
error_log /srv/www/;
location / {
index index.php;
kvandenhaute / default
Last active Aug 29, 2017
Example of a default server configuration for Nginx (sites-available/default).
View default
server {
listen 80 default; ## listen for ipv4; this line is default and implied
listen [::]:80 default ipv6only=on; ## listen for ipv6
# Make site accessible from http://localhost/
server_name localhost;
server_name_in_redirect off;
charset utf-8;
sr75 / my.cnf
Created Apr 14, 2013
Optimized my.cnf for mysql server when setting up physical servers or vps. Configured for 2GB of memory allocated to the mysql process. Adjust connections and max memory for larger setups with more available memory.
View my.cnf
# Disabling symbolic-links is recommended to prevent assorted security risks
# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
DATE=$(date +%Y-%m-%d)
# Backup all databases to S3
for DB in $(mysql --user=$DB_USER --password=$DB_PASSWD -e 'show databases' -s --skip-column-names|grep -Ev "^(information_schema|performance_schema|mysql)$");
MikeRogers0 /
Last active May 19, 2020
A method of backing up your website to Amazon S3.
## Email Variables
EMAILDATE=`date --date="today" +%y-%m-%d`
SUBJECT="[servername] Backup Script Started! - "$EMAILDATE
echo "Just to let you know that the backup script has started."> $EMAILMESSAGE
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
plentz / nginx.conf
Last active Jul 3, 2020
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
bradyvercher / cache-post-thumbnails.php
Created Jan 9, 2014
WordPress: Cache post thumbnail attachments that appear in a WP_Query loop.
View cache-post-thumbnails.php
* Plugin Name: Cache Post Thumbnails
* Description: Prime the post thumbnails cache for individual loops.
* Version: 1.0.0
* Author: Brady Vercher
* Author URI:
* License: GPL-2.0+
* License URI:
janikvonrotz / Install WordPress
Created Mar 3, 2014
Step by Step: Install WordPress Blog #PHP #MySQL #Nginx #phpMyAdmin #WordPress #Markdown #Ubuntu
View Install WordPress

Finishing this guide you'll get:

  • A running WordPress installation
  • Nginx proxy with PHP and Fast CGI
  • MySQL server accessible with phpMyAdmin

Specification of latest running installation:

  • Date: 03.03.2014
You can’t perform that action at this time.