Skip to content

Instantly share code, notes, and snippets.

Kingsley Felix iamkingsleyf

Block or report user

Report or block iamkingsleyf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@petemcw
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.
[client]
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)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
@evansolomon
evansolomon / gist:2274120
Created Apr 1, 2012
nginx WordPress multisite config
View gist:2274120
server {
listen 80 default_server;
server_name domain.com *.domain.com;
root /srv/www/domain.com/public;
access_log /srv/www/domain.com/log/access.log;
error_log /srv/www/domain.com/log/error.log;
location / {
index index.php;
@kvandenhaute
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
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
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# 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
View s3_drupal_backup.sh
#!/bin/bash
TMP="/tmp"
DB_USER="root"
DB_PASSWD="password"
SITES_DIR="/var/www"
S3_BUCKET="s3://bucket-name"
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
MikeRogers0 / backup-to-s3.sh
Last active Apr 13, 2019
A method of backing up your website to Amazon S3.
View backup-to-s3.sh
#!/bin/bash
## Email Variables
EMAILDATE=`date --date="today" +%y-%m-%d`
EMAIL="you@yourdomain.com"
SUBJECT="[servername] Backup Script Started! - "$EMAILDATE
EMAILMESSAGE="/tmp/emailmessage1.txt"
echo "Just to let you know that the backup script has started."> $EMAILMESSAGE
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
@plentz
plentz / nginx.conf
Last active Nov 12, 2019
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@bradyvercher
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
<?php
/**
* Plugin Name: Cache Post Thumbnails
* Description: Prime the post thumbnails cache for individual loops.
* Version: 1.0.0
* Author: Brady Vercher
* Author URI: http://www.blazersix.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
@janikvonrotz
janikvonrotz / Install WordPress Blog.md
Created Mar 3, 2014
Step by Step: Install WordPress Blog #PHP #MySQL #Nginx #phpMyAdmin #WordPress #Markdown #Ubuntu
View Install WordPress Blog.md

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.