Skip to content

Instantly share code, notes, and snippets.

View iamkingsleyf's full-sized avatar

Kingsley Felix iamkingsleyf

View GitHub Profile
<?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.' ),
) );
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "ur-47c9cca-cf33-f245-f3f6-43ed7a58f34f"}); </script>
@iamkingsleyf
iamkingsleyf / sharethis-button.html
Last active August 29, 2015 14:02
Sharethis button
<style>
.geekized-share-buttons
{
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border:1px solid #BBBBBB;
background-color:#FFFFFF;
-webkit-box-shadow: #B3B3B3 5px 5px 5px;
-moz-box-shadow: #B3B3B3 5px 5px 5px;
@iamkingsleyf
iamkingsleyf / is-single.php
Created June 1, 2014 18:09
This example shows how to use is_single() to display something specific only when viewing a single post page:
<?php if(is_single() ) { ?>
SHARETHIS CODE HERE
<?php } ?>
<?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/
@iamkingsleyf
iamkingsleyf / clinic.py
Last active August 29, 2015 14:09
Clinic work flow
#Clinic workflow at codecademy
def clinic():
print "You've just entered the clinic!"
print "Do you take the door on the left or the right?"
answer = raw_input("Type left or right and hit 'Enter'.").lower()
if answer == "left" or answer == "l":
print "This is the Verbal Abuse Room, you heap of parrot droppings!"
elif answer == "right" or answer == "r":
print "Of course this is the Argument Room, I've told you that already!"
# Create comparative statements as appropriate on the lines below!
# Make me true!
bool_one = 3 < 5 # We already did this one for you!
# Make me false!
bool_two = 3 > 5
# Make me true!
bool_three = 4+1 == 5
# 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]
# BEGIN Ban Users
# Begin HackRepair.com Blacklist
if ($http_user_agent ~* "^[Ww]eb[Bb]andit"){ return 403; }
if ($http_user_agent ~* "^binlar"){ return 403; }
if ($http_user_agent ~* "^BlackWidow"){ return 403; }
if ($http_user_agent ~ "^Bolt"){ return 403; }
if ($http_user_agent ~* "^casper"){ return 403; }
if ($http_user_agent ~* "^ChinaClaw"){ return 403; }
if ($http_user_agent ~* "^cmsworldmap"){ return 403; }
if ($http_user_agent ~* "^comodo"){ return 403; }