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
#!/bin/bash | |
# | |
# GoLang cross-compile snippet for Go 1.6+ based loosely on Dave Chaney's cross-compile script: | |
# http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go | |
# | |
# To use: | |
# | |
# $ cd ~/path-to/my-awesome-project | |
# $ go-build-all | |
# |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {
package router | |
import ( | |
"context" | |
"net/http" | |
gpath "path" | |
"github.com/julienschmidt/httprouter" | |
) |
#!/usr/bin/env bash | |
# requires blueutil: `brew install blueutil` | |
if ! sudo -v ; then | |
echo requires root | |
exit | |
fi | |
function dots() { |
// Place user-specific overrides in this file, to ensure they're preserved | |
// when upgrading | |
{ | |
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"] | |
} |
import hoistStatics from 'hoist-non-react-statics'; | |
import React from 'react'; | |
/** | |
* Allows two animation frames to complete to allow other components to update | |
* and re-render before mounting and rendering an expensive `WrappedComponent`. | |
*/ | |
export default function deferComponentRender(WrappedComponent) { | |
class DeferredRenderWrapper extends React.Component { | |
constructor(props, context) { |