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
| {"_id"=>nil, "total_plays"=>486721} | |
| {"_id"=>"(Various Artists) ", "total_plays"=>5858} | |
| {"_id"=>"Radiohead", "total_plays"=>5181} | |
| {"_id"=>"Beck", "total_plays"=>3713} | |
| {"_id"=>"Built to Spill", "total_plays"=>3439} | |
| {"_id"=>"Pixies", "total_plays"=>3404} | |
| {"_id"=>"Modest Mouse", "total_plays"=>3173} | |
| {"_id"=>"Arcade Fire", "total_plays"=>3130} | |
| {"_id"=>"Death Cab for Cutie", "total_plays"=>3033} | |
| {"_id"=>"Wilco", "total_plays"=>3019} |
| // Thanks to http://www.labs.saachitech.com/2012/10/23/pdf-generation-using-uiprintpagerenderer | |
| // Note: including images in the HTML won't work, see here: | |
| // https://github.com/nyg/HTMLWithImagesToPDF | |
| import UIKit | |
| // 1. Create a print formatter | |
| let html = "<b>Hello <i>World!</i></b>" | |
| let fmt = UIMarkupTextPrintFormatter(markupText: html) |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
Creates an injector object that can be used for retrieving services as well as for dependency injection
// create an injector
var $injector = angular.injector(['ng']);
// use the injector to kick off your application
// use the type inference to auto inject arguments, or use implicit injection
$injector.invoke(function($rootScope, $compile, $document){| 'use strict'; | |
| var babel = require('babel-core'); | |
| var fs = require('fs'); | |
| // borrowed from https://github.com/babel/babel-jest/blob/master/index.js | |
| require.extensions['.jsx'] = function (module, filename) { | |
| var src = fs.readFileSync(filename, 'utf8'); | |
| // Allow the stage to be configured by an environment | |
| // variable, but use Babel's default stage (2) if |
| ❯ rollup --version | |
| rollup version 0.25.3 | |
| ❯ time rollup -c ./rollup.js | |
| rollup -c ./rollup.js 4.65s user 0.22s system 118% cpu 4.131 total | |
| ❯ time webpack | |
| Hash: ebb00bbccd954c114d3c | |
| Version: webpack 2.0.7-beta | |
| Time: 3623ms |
| year | how many | ordinance or law | resolution | exective order or directive | admin memo, IT policy, etc | city | county | state | |
|---|---|---|---|---|---|---|---|---|---|
| 2006 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | |
| 2009 | 3 | 2 | 0 | 1 | 0 | 2 | 1 | 0 | |
| 2010 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | |
| 2011 | 4 | 2 | 1 | 0 | 1 | 1 | 2 | 1 | |
| 2012 | 7 | 5 | 0 | 2 | 0 | 5 | 1 | 1 | |
| 2013 | 16 | 7 | 0 | 5 | 4 | 8 | 3 | 5 | |
| 2014 | 20 | 11 | 1 | 6 | 2 | 14 | 3 | 3 | |
| 2015 | 8 | 1 | 1 | 3 | 3 | 8 | 0 | 0 | |
| 2016 | 9 | 2 | 4 | 3 | 0 | 8 | 0 | 1 |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.