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
var gulp = require('gulp'); | |
var sass = require('gulp-ruby-sass'); | |
var rename = require('gulp-rename'); | |
var notify = require('gulp-notify'); | |
var plumber = require('gulp-plumber'); | |
var gutil = require('gulp-util'); | |
var minifycss = require('gulp-minify-css'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
######################### | |
# Autoinstall script using chocolatey | |
######################### | |
# Note: Net 4.0 must be installed prior to running this script | |
# | |
#Modify this line to change packages | |
$items = @("ccleaner", "microsoftsecurityessentials", "7zip", "adobereader", "javaruntime", "libreoffice", "googlechrome", "firefox", "vim", "teracopy", "winscp", "wget", "putty", "emacs", "hg") | |
################# |
// I return the count of watchers on the current page. | |
function getWatchCount() { | |
// Keep track of the total number of watch bindings on the page. | |
var total = 0; | |
// There are cases in which two different ng-scope markers will actually be referencing | |
// the same scope, such as with transclusion into an existing scope (ie, cloning a node | |
// and then linking it with an existing scope, not a new one). As such, we need to make | |
// sure that we don't double-count scopes. |
# EditorConfig is awesome: http://EditorConfig.org | |
# Set this as the root EditorConfig file | |
root = true | |
# Default settings for all files | |
[*] | |
trim_trailing_whitespace = true | |
charset = utf-8 | |
end_of_line = lf |
// See also: https://github.com/azer/environ | |
//http://nextmarvel.net/blog/2011/02/one-line-javascript-browser-detection/ | |
var IE6 = /msie 6/i.test(navigator.userAgent), | |
IE7 = /msie 7/i.test(navigator.userAgent), | |
IE8 = /msie 8/i.test(navigator.userAgent), | |
IE9 = /msie 9/i.test(navigator.userAgent), | |
IE10 = /msie 9/i.test(navigator.userAgent), | |
SAFARI = /safari/i.test(navigator.userAgent), |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Copyright (C) 2014 ADDY OSMANI <addyosmani.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
Yoyo. There are more articles/resources available than the below, but most appear to be older. To avoid the pain of upgrading finding things broken, I would try one of these. They're more recent.
I've heard this before:
What I really get frustrated by is that I cannot wrap
console.*
and preserve line numbers
We enabled this in Chrome DevTools via blackboxing a bit ago.
If you blackbox the script file the contains the console log wrapper, the script location shown in the console will be corrected to the original source file and line number. Click, and the full source is looking longingly into your eyes.
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |