Skip to content

Instantly share code, notes, and snippets.

@Coopeh
Coopeh / WordPress-TypeKit-Asynchronous-Load-Admin-Menu-Bar.php
Created September 27, 2012 18:28
WordPress TypeKit Asynchronous Load Admin Menu Bar
function typekit_admin_menu() {
?>
<script type="text/javascript">
(function() {
var config = {
kitId: 'typekitidhere',
scriptTimeout: 3000
};
var h=document.getElementsByTagName("html")[0];h.className+=" wf-loading";var t=setTimeout(function(){h.className=h.className.replace(/(\s|^)wf-loading(\s|$)/g," ");h.className+=" wf-inactive"},config.scriptTimeout);var
tk=document.createElement("script"),d=false;tk.src='//use.typekit.net/'+config.kitId+'.js';tk.type="text/javascript";tk.async="true";tk.onload=tk.onreadystatechange=function(){var
@Coopeh
Coopeh / typekit-fout-protection.css
Created October 15, 2012 23:32
TypeKit-FOUT-Protection
.wf-loading {
opacity: 0;
visibility: hidden;
}
.ie.wf-loading {
visibility: hidden;
}
.ie.wf-active {
@Coopeh
Coopeh / php-fpm.conf
Created October 15, 2012 23:51
php-fpm.conf
catch_workers_output = yes
@Coopeh
Coopeh / php.ini
Last active October 11, 2015 17:48
php.ini
log_errors = On
error_log = /dir/you/want/to/use/for/logging.log
@Coopeh
Coopeh / wordpress-stand-in-text-if-no-content.php
Created October 28, 2012 18:44
WordPress Stand-in Text If No Content
<?php if($content = $post->post_content){
the_content();
} else { ?>
Coming soon!
<?php } ?>
@Coopeh
Coopeh / no-text-selection.css
Created October 29, 2012 15:57
No Text Selection
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
@Coopeh
Coopeh / index.html
Created October 31, 2012 01:12
A CodePen by Coopeh.
<div class="container">
<div class="left">
<ul>
<li><a href="#">Menu Item 1</a>
<ul>
<li><a href="#">Menu-Sub1</a></li>
<li><a href="#">Menu-Sub2</a></li>
<li><a href="#">Menu-Sub3</a></li>
</ul>
</li>
@Coopeh
Coopeh / jquery-multiple-not-selectors.js
Created November 2, 2012 17:57
jQuery Multiple :not Selectors
jQuery('a:not([href^=mailto]):not(".bsub")').click(function() {
var location = jQuery(this).attr('href');
jQuery('#content').animate({
opacity: 0
}, 250);
jQuery('.bounce').animate({
left: -500
}, 300, function() {
document.location = location;
});
@Coopeh
Coopeh / create-iso-from-folder
Created November 10, 2012 23:23
Create ISO From Folder
hdiutil makehybrid -o ~/Downloads/Win8.iso ~/Downloads/SW_DVD5_Win_Pro_8_64BIT_English_MLF_X18-16134/ -iso -joliet
@Coopeh
Coopeh / wpmu-power-tools.php
Created November 24, 2012 16:31
WPMU Power Tools
<?php
/*
* Plugin Name: WPMU Power Tools
* Plugin URI: http://plugins.paidtoblog.com/wpmu-power-tools/
* Description: A few powerfull tools that every WPMU Admin should have.
* Author: Brian Freeman (aka MrBrian)
* Version: 0.7
*/
/* Some sample snippet codes for PHP Executor (feel free to send in yours)