Skip to content

Instantly share code, notes, and snippets.

View iamkingsleyf's full-sized avatar
🏠
Working from home

Kingsley Felix iamkingsleyf

🏠
Working from home
View GitHub Profile
@iamkingsleyf
iamkingsleyf / wp-config.php
Created July 15, 2017 19:20 — forked from ryanjbonnell/wp-config.php
WordPress Config: Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address
// 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];
}
@iamkingsleyf
iamkingsleyf / newspaper-style
Created June 23, 2017 18:30
my newspaper quote style
/* CUSTOM QUOTE SIZE */
.td-post-content blockquote {
background-color: #FCFCFC;
border-left: 2px solid #4db2ec;
padding: 15px 23px 0 23px;
position: relative;
top: 6px;
clear: both;
margin: 0 0 29px 0;
}
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name example.com www.example.com;
@iamkingsleyf
iamkingsleyf / link-list
Created April 20, 2016 09:22
side by side adsense link list for 200x90
@iamkingsleyf
iamkingsleyf / nginx-wpcache-phpfpm
Created November 26, 2015 18:09
php-fpm nginx wordpress wpsupercache conf
##
# 301 redirect conf
##
server {
listen 80;
server_name healthable.org;
rewrite ^(.*) http://www.healthable.org$1 permanent;
}
##
@iamkingsleyf
iamkingsleyf / default.conf
Created November 24, 2015 16:35
default nginx + hhvm conf
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@iamkingsleyf
iamkingsleyf / domain.conf
Last active June 11, 2016 22:03
nginx hhvm configuration
##
# 301 redirect conf
##
server {
listen 80;
server_name www.citymp3.xyz;
rewrite ^(.*) http://citymp3.xyz$1 permanent;
}
##
##
# 301 redirect settings
##
server {
listen 80;
server_name healthable.org;
rewrite ^(.*) http://www.healthable.org$1 permanent;
}
##
# 301 redirect settings
##
server {
listen 80;
server_name healthable.org;
rewrite ^(.*) http://www.healthable.org$1 permanent;
}
# WordPress website: Healthable
#Redirect NON www to www for www.healthable.org
server {
listen 80;
server_name healthable.org;
return 301 http://www.healthable.org$request_uri;
}
# the server directive is nginx's virtual host directive.