jq is useful to slice, filter, map and transform structured json data.
brew install jq
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
| <!DOCTYPE html> | |
| <html class="html"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Document</title> | |
| <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> | |
| <style> | |
| .axis text { | |
| font: 10px sans-serif; |
Easy example on how to put marker on a d3.js map.
You got 2 options:
| $ cf buildpacks | |
| Getting buildpacks... | |
| buildpack position enabled locked filename | |
| staticfile_buildpack 1 true false staticfile_buildpack-cached-v1.2.1.zip | |
| java_buildpack 2 true false java-buildpack-v3.1.zip | |
| ruby_buildpack 3 true false ruby_buildpack-cached-v1.6.1.zip | |
| nodejs_buildpack 4 true false nodejs_buildpack-cached-v1.5.0.zip | |
| go_buildpack 5 true false go_buildpack-cached-v1.5.0.zip | |
| python_buildpack 6 true false python_buildpack-cached-v1.5.0.zip |
@mafintosh asks: "Does anyone have a good code example of when to use setImmediate instead of nextTick?"
https://twitter.com/mafintosh/status/624590818125352960
The answer is "generally anywhere outside of core".
process.nextTick is barely asynchronous. Flow-wise it is asynchronous, but it will trigger before any other asynchronous events can (timers, io, etc.) and thus can starve the event loop.
In this script I show a starved event loop where I just synchronously block, use nextTick and setImmediate
| <html> | |
| <head> | |
| <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/> | |
| <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> | |
| <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> | |
| <script src="leaflet-providers.js"></script> | |
| </head> | |
| <body> | |
| <div id="map" style="width: 100%; height: 300px;"></div> | |
| <script type="text/javascript"> |
This file shows how to use the conicConformalPortugal projection from d3-composite-projections. The example is the same as the one at this block, but with this new composite projection gives a much better result.