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
Mike McNeil, Aug 2014
Humans are not very good at planning. We have no problem running scenarios, thinking through possibilities, and pondering "what if?" questions. I might plan to not eat my cousin's birthday cake before she gets home, for instance. If I'm very serious, I might write down my commitment; or if I'm unsure about the pros and cons, use some organizational tool like a T-chart.
But when it comes to making a decision in the moment, all bets are off. The cake is a goner.
Below, I've included a figure containing a decision tree diagram.
let fizzbuzz = function*(){ | |
for (var val = 1; val < 100; val++) { | |
if(val % 15 === 0){ | |
yield "FizzBuzz"; | |
} | |
else if(val % 3 === 0){ | |
yield "Fizz"; | |
} | |
else if(val % 5 === 0){ | |
yield "Buzz"; |
// Example based in Substack Stream Handbook: | |
// https://github.com/substack/stream-handbook#creating-a-readable-stream | |
'use strict' | |
var inherits = require('inherits') | |
var duplexify = require('duplexify') | |
var Stream = require('readable-stream').Stream | |
var CONST = { |
function getGraphicsCardName() { | |
var canvas = document.createElement("canvas"); | |
var gl = canvas.getContext("experimental-webgl") || canvas.getContext("webgl"); | |
if (!gl) { | |
return "Unknow"; | |
} | |
var ext = gl.getExtension("WEBGL_debug_renderer_info"); | |
if (!ext) { |
This is a collection of basic "recipes", many using twurl (the Swiss Army Knife for the Twitter API!) and jq to query the Twitter API and format the results. Also, some scripts to test or automate common actions.
// Turn off autocomplete in Visual Studio Code | |
// http://code.visualstudio.com/ | |
// Add the following lines to user settings | |
// OPTIONAL WORD WRAPPING | |
// Controls if lines should wrap. The lines will wrap at min(editor.wrappingColumn, viewportWidthInColumns). | |
"editor.wordWrap": true, | |
// Controls the indentation of wrapped lines. Can be one of 'none', 'same' or 'indent'. | |
"editor.wrappingIndent": "indent", |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Foo</title> | |
<meta charset='utf-8' /> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' /> | |
<style type='text/css'> | |
body { | |
font-family: 'Helvetica'; | |
letter-spacing:-5px; |
cd /System/Library/CoreServices/Spotlight.app/Contents/MacOS | |
sudo cp Spotlight Spotlight.bak | |
sudo perl -pi -e 's|(\x00\x00\x00\x00\x00\x00\x47\x40\x00\x00\x00\x00\x00\x00)\x42\x40(\x00\x00\x80\x3f\x00\x00\x70\x42)|$1\x00\x00$2|sg' Spotlight | |
cmp -l Spotlight Spotlight.bak | |
sudo codesign -f -s - Spotlight | |
sudo killall Spotlight |