Skip to content

Instantly share code, notes, and snippets.


Kingsley Felix iamkingsleyf

View GitHub Profile
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];
janikvonrotz / Enable Piwik geolocation support with GeoIP
Last active Feb 13, 2017
Ubuntu: Enable Piwik geolocation support with GeoIP PECL #Piwik #Markdown
View Enable Piwik geolocation support with GeoIP


By default Piwik uses the provider location to guess a visitor's country based on the language they use. This is not very accurate, so they recommend installing and using GeoIP.


  • Ubuntu server
  • libgeoip-dev
  • Nginx
  • Nginx minimal website
jameskoster / style.css
Created Apr 3, 2014
Our Team - Apply layout to the shortcode output
View style.css
.widget_woothemes_our_team .columns-2,
.widget_woothemes_our_team .columns-3,
.widget_woothemes_our_team .columns-4,
.widget_woothemes_our_team .columns-5,
.widget_woothemes_our_team .columns-6 {
overflow: hidden;
zoom: 1;
.widget_woothemes_our_team .columns-2 .team-member,
.widget_woothemes_our_team .columns-3 .team-member,
feczo /
Last active Jul 23, 2020
How to use Compute Engine - GCE with putty
bradp / gist:2e71455f9795fb2e6b2d
Last active Oct 6, 2015
Nginx + HHVM Configuration
View gist:2e71455f9795fb2e6b2d
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
# 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.
stayallive /
Last active May 4, 2018
Install PHP 5.6.7 on Plesk 11.5 & 12 (CentOS 6)
# Make sure you are up to date
yum -y update && yum -y install wget
# Install EPEL repository
rpm -ivh
# Get us a clean working directory
mkdir /php
Globegitter /
Last active Sep 22, 2019
Install the latest nginx from source for Ubuntu 14.04
# Automatically instal the latest nginx
wget -O - | 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 trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src trusty nginx" | sudo tee -a /etc/apt/sources.list
krohn / gist:00ea01e56588823da52f
Created Sep 17, 2014
block humans.txt scans
View gist:00ea01e56588823da52f
# block humans.txt scans
<IfModule mod_rewrite.c>
RewriteCond %{QUERY_STRING} http\:\/\/www\.google\.com\/humans\.txt\? [NC]
RewriteRule .* - [F,L]
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_protocols TLSv1 TLSv1.1 TLSv1.2;
You can’t perform that action at this time.