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
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
// Post to Campfire (ctrl alt cmd p) | |
// Setup | |
var CHAT_ROOM = "Main Room" | |
var flint = SBApplication.application("Flint"), | |
msg = [doc askForUserInput:"Post to Campfire:" initialValue:""]; | |
if (msg) { | |
[flint post:msg toRoom:CHAT_ROOM] |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
/** | |
* SketchLayers - a collection of layer related functions | |
* | |
* @type {object} | |
*/ | |
var SketchLayers = | |
{ | |
collection : [], | |
selection : function() |
/** | |
* Read text from a file at the given path | |
* | |
* @param {string} path given file path | |
* @return {mixed} string with text if successful, false if error | |
*/ | |
function readTextFromFile( path ) | |
{ | |
var result = false; |
# Exclude the Podspecs | |
Pods/* | |
Podfile.lock | |
# Exclude any PSD/AI source | |
#*.psd | |
#*.ai | |
# Exclude generated files | |
VersionX-revision.h |