Skip to content

Instantly share code, notes, and snippets.

View iamkingsleyf's full-sized avatar

Kingsley Felix iamkingsleyf

View GitHub Profile
@iamkingsleyf
iamkingsleyf / my.cnf
Last active September 1, 2015 00:18 — forked from petemcw/my.cnf
Ubuntu MySQL 5.1 Configuration - 4GB RAM, Heavy InnoDB
# 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.
@iamkingsleyf
iamkingsleyf / 4GB-4Core-VPS-my.cnf
Last active August 29, 2015 12:28 — forked from lukebranch/4GB-4Core-VPS-my.cnf
/etc/my.cnf config for 4GB RAM 4 Core VPS - Wordpress
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server-1 generated for Luke at 2014-10-22 09:47:40
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
@iamkingsleyf
iamkingsleyf / gfpc_prev_next_nav.php
Last active August 29, 2015 14:28 — forked from cpaul007/gfpc_prev_next_nav.php
Replacing default prev/next arrow with font awesome icon
<?php
//* Do not add this opening tag
/**
* Replacing default Prev/Next arrow with Font Awesome icon
*
* Add the following codes in functions.php file
*
* @author Genesis Developer
* @link http://genesisdeveloper.me
@iamkingsleyf
iamkingsleyf / gist:7f9cec2ffb90f45f79b4
Last active August 29, 2015 14:27 — forked from krohn/gist:00ea01e56588823da52f
block humans.txt scans
# block humans.txt scans
# http://perishablepress.com/protect-against-humans-txt-query-string-scans/
<IfModule mod_rewrite.c>
RewriteCond %{QUERY_STRING} http\:\/\/www\.google\.com\/humans\.txt\? [NC]
RewriteRule .* - [F,L]
</IfModule>
@iamkingsleyf
iamkingsleyf / nginx-latest.sh
Last active August 29, 2015 14:27 — forked from Globegitter/nginx-latest.sh
Install the latest nginx from source for Ubuntu 14.04
# 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
@iamkingsleyf
iamkingsleyf / gist:2a1c2be769c0af1e0faf
Last active August 29, 2015 14:27 — forked from evansolomon/gist:2274120
nginx WordPress multisite config
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;
@iamkingsleyf
iamkingsleyf / custom_posttype_glance.php
Last active August 29, 2015 14:27 — forked from feryardiant/custom_posttype_glance.php
Adding Custom post type counts in 'Right now' Dashboard widget in Wordpress 3.8 or above
<?php
/**
* Adding Custom post type counts in 'Right now' Dashboard widget.
* Acording this changes :
* - https://core.trac.wordpress.org/ticket/26571
* - https://core.trac.wordpress.org/ticket/26495
* now you can't use 'right_now_*' action API to show your custom post type count from your Dashboard.
* But if you running WP 3.8 or above, you can use 'dashboard_glance_items' instead.
*
* @package Wordpress
<?php
//checking if the function exist to avoid conflicts
if (function_exists('get_rocket_cdn_url')){
?>
<img class="logo" src="<?php echo get_rocket_cdn_url (get_option('logo_url') );?>"/>
<?php } ?>
@iamkingsleyf
iamkingsleyf / my.cnf-2GB
Last active August 29, 2015 14:16 — forked from sr75/my.cnf
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram