Skip to content

Instantly share code, notes, and snippets.

View iamkingsleyf's full-sized avatar

Kingsley Felix iamkingsleyf

View GitHub Profile
@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]
<?php
// register the custom post type widget area
genesis_register_sidebar( array(
'id' => 'cpt-archive-sidebar',
'name' => __( 'Custom Post Type Sidebar' ),
'description' => __( 'Display this sidebar on your custom post type archive page.' ),
) );
<?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
*/
<?php
//do not copy the opening php tag above
/**
* Changing the AuthorBox in WordPress
*
* @package Changing the AuthorBox in WordPress
* @author Neil Gee
* @link http://coolestguidesontheplanet.com/author-box-genesis/
# Create a filter called 'apache-wp-login'
[Definition]
failregex = <HOST>.*] "POST /wp-login.php HTTP/.*" 200
ignoreregex =
[INCLUDES]
before = apache-common.conf
# Create a jail
[wp-login]
@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
<?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 / 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
@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;