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
<?php | |
/* | |
Plugin Name: R Debug | |
Description: Set of dump helpers for debug. | |
Author: Andrey "Rarst" Savchenko | |
Author URI: https://www.rarst.net/ | |
License: MIT | |
*/ |
var express = require('express'), | |
auth = require('http-auth'); | |
// Configure basic auth | |
var basic = auth.basic({ | |
realm: 'SUPER SECRET STUFF' | |
}, function(username, password, callback) { | |
callback(username == 'admin' && password == 'f00lpr00f'); | |
}); |
image: node:8.9.0 | |
cache: | |
paths: | |
- node_modules/ | |
stages: | |
- deploy | |
before_script: |
<?php | |
if( function_exists('acf_add_local_field_group') ): | |
acf_add_local_field_group(array ( | |
'key' => 'acf_product_options', | |
'title' => 'Product Options', | |
'fields' => array ( | |
array ( | |
'key' => 'acf_product_options_tabbedcontent_label', | |
'label' => 'Tabbed Content', |
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) */ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, |
<?php | |
// https://github.com/GerHobbelt/nicejson-php/blob/master/nicejson.php | |
// original code: http://www.daveperrett.com/articles/2008/03/11/format-json-with-php/ | |
// adapted to allow native functionality in php version >= 5.4.0 | |
/** | |
* Format a flat JSON string to make it more human-readable | |
* |
<?php | |
define('VERIFY_TOKEN', 'yourappssecret'); | |
$method = $_SERVER['REQUEST_METHOD']; | |
if ($method == 'GET' && $_GET['hub_mode'] == 'subscribe' && $_GET['hub_verify_token'] == VERIFY_TOKEN) { | |
echo $_GET['hub_challenge']; | |
} else if ($method == 'POST') { | |
$updates = json_decode(file_get_contents("php://input"), true); |
[ | |
{ | |
"keys": ["super+alt+shift+5"], | |
"command": "set_layout", | |
"caption" : "1-2 Grid", | |
"args": | |
{ | |
"cols": [0.0, 0.5, 1.0], | |
"rows": [0.0, 0.5, 1.0], | |
"cells": |
# this file blocks ip requests - only request with Host are supported | |
server { | |
listen 80 default_server; | |
listen 443 default_server ssl; | |
server_name _; | |
return 444; | |
} |