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
| /* | |
| * Sanitize Checkbox | |
| */ | |
| // Source: https://github.com/FlagshipWP/flagship-library/blob/develop/customizer/classes/customizer-base.php | |
| /** | |
| * Sanitize a checkbox to only allow 0 or 1 | |
| * | |
| * @since 1.2.0 | |
| * @access public |
| <?php | |
| /** | |
| * Callback function for taxonomy meta boxes | |
| * | |
| * A simple callback function for 'meta_box_cb' argument | |
| * inside register_taxonomy() that replaces the regular | |
| * checkboxes with a plain dropdown list | |
| * | |
| * @param [type] $post [description] | |
| * @param [type] $box [description] |
| (function() { | |
| tinymce.create('tinymce.plugins.typekit', { | |
| init: function(ed, url) { | |
| ed.onPreInit.add(function(ed) { | |
| // Get the iframe. | |
| var doc = ed.getDoc(); | |
| // Create the script to inject into the header asynchronously. | |
| var jscript = "(function() { | |
| var config = { |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
These rules are adopted from the AngularJS commit conventions.
| <?php | |
| /** | |
| * Plugin Name: Grunt Sitemap Generator | |
| * Plugin URI: http://www.github.com/lgladdy | |
| * Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php | |
| * Author: Liam Gladdy | |
| * Author URI: http://gladdy.co.uk | |
| * Version: 1.0 | |
| */ | |
| #301 Redirect Local Images to Live | |
| RedirectMatch 301 ^/wp-content/uploads/(.*) http://livewebsite.com/wp-content/uploads/$1 |
| // MultiExporter.jsx | |
| // Version 0.1 | |
| // Version 0.2 Adds PNG and EPS exports | |
| // Version 0.3 Adds support for exporting at different resolutions | |
| // Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize | |
| // Version 0.5 Fixed cropping issues | |
| // Version 0.6 Added inner padding mode to prevent circular bounds clipping | |
| // | |
| // Copyright 2013 Tom Byrne | |
| // Comments or suggestions to tom@tbyrne.org |
| // Clamps a block of text to a certain number of lines, | |
| // followed by an ellipsis in Webkit and Blink based browsers | |
| // Reference: http://dropshado.ws/post/1015351370/webkit-line-clamp | |
| @mixin text-clamp($lines: 2, $line-height: false) { | |
| overflow: hidden; | |
| display: -webkit-box; | |
| -webkit-box-orient: vertical; | |
| -webkit-line-clamp: $lines; | |
| // Fallback for non-Webkit browsers |