A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| // ---- | |
| // Sass (v3.4.11) | |
| // Compass (v1.0.3) | |
| // ---- | |
| @function math-pow($number, $exp) { | |
| @if (round($exp) != $exp) { | |
| @return math-exp($exp * math-ln($number)); | |
| } |
| <?php | |
| ################################################################################ | |
| // Custom WordPress Local Config | |
| // Use only for Development | |
| // https://gist.github.com/bhubbard/8428583 | |
| ################################################################################ | |
| /* Database Connection Info */ | |
| define('DB_NAME', ''); | |
| define('DB_USER', ''); |
| // Get The Page ID You Need | |
| get_option( 'woocommerce_shop_page_id' ); | |
| get_option( 'woocommerce_cart_page_id' ); | |
| get_option( 'woocommerce_checkout_page_id' ); | |
| get_option( 'woocommerce_pay_page_id' ); | |
| get_option( 'woocommerce_thanks_page_id' ); | |
| get_option( 'woocommerce_myaccount_page_id' ); | |
| get_option( 'woocommerce_edit_address_page_id' ); | |
| get_option( 'woocommerce_view_order_page_id' ); | |
| get_option( 'woocommerce_terms_page_id' ); |
| <?php | |
| /* Prevent loading this file directly and/or if the class is already defined */ | |
| if ( ! defined( 'ABSPATH' ) || class_exists( 'MYFX_Settings_Class' ) ) | |
| return; | |
| /** | |
| * Settings with Meta Boxes | |
| * Helper class to easily create settings page for plugin or theme with Meta Box API. | |
| * |
| <?php | |
| /** | |
| * This little class records how long it takes each WordPress action or filter | |
| * to execute which gives a good indicator of what hooks are being slow. | |
| * You can then debug those hooks to see what hooked functions are causing problems. | |
| * | |
| * This class does NOT time the core WordPress code that is being run between hooks. | |
| * You could use similar code to this that doesn't have an end processor to do that. | |
| * |
| # | |
| # Sources: | |
| # http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites | |
| # http://codex.wordpress.org/Output_Compression | |
| # http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086 | |
| # http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/ | |
| # http://gtmetrix.com/configure-entity-tags-etags.html | |
| # http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014 | |
| # http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress | |
| # https://andreashecht-blog.de/4183/ |
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
| <?php | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |
| <html> | |
| <head> | |
| <title>Checkbox</title> | |
| <style> | |
| input[type=checkbox] { | |
| display:none; | |
| } | |
| input[type=checkbox] + label | |
| { |