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
| for(var i=0;i<99999;i++){ | |
| clearInterval(i); | |
| clearTimeout(i); | |
| } |
| // Custom jQuery function. | |
| // Determines if element is withing the viewport. | |
| $.fn.inViewport = function() { | |
| $el = this; | |
| var elTop = $el.offset().top; | |
| var elBot = elTop + $el.outerHeight(true); | |
| var winScrollTop = $(window).scrollTop(); | |
| var winHeight = $(window).height(); | |
| var inViewport = winScrollTop <= elBot && (winScrollTop + winHeight) >= elTop; | |
| return inViewport; |
| while true; do date; sleep 5; done |
| /** | |
| * Below are several examples of methods that are difficult to clearly annotate with JSDoc annotations. | |
| */ | |
| /** | |
| * @param {Object} people An index of people keyed by a person's name | |
| * @returns {Object} map An index of zipcodes keyed by a person's name | |
| */ | |
| function find(people) { |
| @echo off | |
| SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
| rem add it for all file types | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
| rem add it for folders | |
| @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {number} a random floating point number | |
| */ | |
| function getRandomFloat(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } |
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J