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
| <!-- Raven.js Config --> | |
| <script src="{{ JS_PATH }}/lib/raven.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| // Ignore list based off: https://gist.github.com/1878283 | |
| var ravenOptions = { | |
| // Will cause a deprecation warning, but the demise of `ignoreErrors` is still under discussion. | |
| // See: https://github.com/getsentry/raven-js/issues/73 | |
| ignoreErrors: [ | |
| // Random plugins/extensions | |
| 'top.GLOBALS', |
| type Whatever struct { | |
| someField int | |
| } | |
| func (w Whatever) MarshalJSON() ([]byte, error) { | |
| return json.Marshal(struct{ | |
| SomeField int `json:"some_field"` | |
| }{ | |
| SomeField: w.someField, | |
| }) |
This is no longer needed as Emmet supports JSX - you just need to turn it all on. Did a quick tutorial: http://wesbos.com/emmet-react-jsx-sublime/
Thanks, @wesbos
| #!/usr/bin/env python | |
| # | |
| # A handy tool to compile and execute C source directly. | |
| # | |
| # @author Yecheng Fu <[email protected]> | |
| import os | |
| import sys | |
| import tempfile | |
| import subprocess |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| import React, { Component } from 'react' | |
| import Subapp from './subapp/Root' | |
| class BigApp extends Component { | |
| render() { | |
| return ( | |
| <div> | |
| <Subapp /> | |
| <Subapp /> | |
| <Subapp /> |
rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)