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 db = firebase.firestore(); | |
| var content = require("./sourceData.json"); | |
| content && | |
| Object.keys(content).forEach(contentKey => { | |
| const nestedContent = content[contentKey]; | |
| if (typeof nestedContent === "object") { | |
| Object.keys(nestedContent).forEach(docTitle => { | |
| firebase | |
| .firestore() |
| (function($,sr){ | |
| // debouncing function from John Hann | |
| // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
| var debounce = function (func, threshold, execAsap) { | |
| var timeout; | |
| return function debounced () { | |
| var obj = this, args = arguments; | |
| function delayed () { |
This is a series of MATLAB style relational operators for Handlebars.
Drop in replace functions for setTimeout and setInterval that make use of requestAnimationFrame.
See overview article and Paul Irish's earlier post.
Courtesty of Joe Lambert
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| // Relace the jQuery AJAX snippet by this: | |
| $.ajax({ | |
| type: 'GET', | |
| url: 'ajax.php', | |
| data: { | |
| tag: tag, | |
| max_id: maxid | |
| }, | |
| dataType: 'json', |
| Drop in replace functions for setTimeout() & setInterval() that | |
| make use of requestAnimationFrame() for performance where available | |
| http://www.joelambert.co.uk | |
| Copyright 2011, Joe Lambert. | |
| Free to use under the MIT license. | |
| http://www.opensource.org/licenses/mit-license.php |