Skip to content

Instantly share code, notes, and snippets.

View jptksc's full-sized avatar
🤌

Jason Schuller jptksc

🤌
View GitHub Profile
I am attesting that this GitHub handle Circa75 is linked to the Tezos account tz1XuuWRftyAeo2iBkekZdcYBS8Gkb4NjJQw for tzprofiles
sig:edsigtc8EyLMCJ9d6uuoGCrunWt5pUoQaU5Ew6ASnoS6AEXJ3oFs6ETiqtf1ZrSyr2Hgn2GegfsUfsCsg7MFEpg6rMWqWHP3Zsd
@jptksc
jptksc / mouse.scss
Last active January 20, 2018 03:29
Mouse Scrolling Animation
.mouse {
width: 26px;
height: 40px;
position: absolute;
bottom: 40px;
left: 50%;
transform: translate(-50%, 0);
z-index: 20;
border: 1px solid rgba(#ffffff, 0.5);
border-radius: 13px;
@jptksc
jptksc / clean_wp_admin
Created October 7, 2014 16:55
Clean the WP admin.
// Clean the admin.
function pk_clean_admin () {
remove_menu_page('edit.php');
remove_menu_page('upload.php');
remove_menu_page('edit.php?post_type=page');
remove_menu_page('edit-comments.php');
remove_menu_page('options-general.php');
remove_menu_page('tools.php');
global $submenu;
@jptksc
jptksc / wp_clean_dash
Created October 7, 2014 16:51
Clean the WP Dashboard
// Clean the dashboard.
function pk_clean_dashboard() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
unset($wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now']);
unset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']);
@jptksc
jptksc / get_twitter_profile_image
Created August 9, 2013 15:07
Get and cache any Twitter profile image without the Twitter API.
function get_twitter_profile_img($username, $size = '') {
$api_call = 'https://twitter.com/users/'.$username.'.json';
$results = json_decode(file_get_contents($api_call));
$image_url = str_replace('_normal', $size, $results->profile_image_url);
// Replace with your cache directory.
$image_path = './cache/';
// Get the name of the file.
$exploded_image_url = explode("/",$image_url);
@jptksc
jptksc / get_twitter_profile_img
Created June 13, 2013 23:49
Get a large Twitter profile image without having to deal with v1.1 API authentication.
function get_twitter_profile_img($username) {
$xml = simplexml_load_file('http://twitter.com/users/'.$username.'.xml');
return str_replace('_normal', '', $xml->profile_image_url);
}
@jptksc
jptksc / gist:2352366
Created April 10, 2012 15:54
Theme Options Check
/*-----------------------------------------------------------------------------------*/
/* Theme Options Check
/*-----------------------------------------------------------------------------------*/
opt_check();
function opt_check()
{
if ( !function_exists('option_tree_category') )
{