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
@plentz
plentz / nginx.conf
Last active Nov 14, 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
@feczo
feczo / putty-gce.md
Last active Nov 6, 2019
How to use Compute Engine - GCE with putty
View putty-gce.md
@Globegitter
Globegitter / nginx-latest.sh
Last active Sep 22, 2019
Install the latest nginx from source for Ubuntu 14.04
View nginx-latest.sh
# Automatically instal the latest nginx
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
#Make a backup copy of your current sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#Now copy the following repositories to the end of ` /etc/apt/sources.list`
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
@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;
@ryanjbonnell
ryanjbonnell / wp-config.php
Created Mar 12, 2014
WordPress Config: Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address
View wp-config.php
// Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address
if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
$http_x_headers = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
$_SERVER['REMOTE_ADDR'] = $http_x_headers[0];
}
@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.
@markjaquith
markjaquith / nginx.conf
Last active Jul 14, 2019
My WordPress Nginx setup
View nginx.conf
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@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
@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
You can’t perform that action at this time.