Real unit test (isolation, no children render)
Calls:
- constructor
- render
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| /* | |
| This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
| It will generate several classes such as: | |
| .m-r-10 which gives margin-right 10 pixels. | |
| .m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
| .m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
| .p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
| .p-l-40 gives PADDING to the LEFT of 40 pixels |
| /** | |
| * Created by ninh on 6/17/16. | |
| */ | |
| var fs = require("fs"); | |
| function main() { | |
| fs.readdir("./node_modules", function (err, dirs) { | |
| if (err) { | |
| console.log(err); | |
| return; |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
We are building a Node.js service which will need asynchronous support for tasks like sending emails. Here's our evaluation:
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| /** | |
| * HSV to RGB color conversion | |
| * | |
| * H runs from 0 to 360 degrees | |
| * S and V run from 0 to 100 | |
| * | |
| * Ported from the excellent java algorithm by Eugene Vishnevsky at: | |
| * http://www.cs.rit.edu/~ncs/color/t_convert.html | |
| */ | |
| function hsvToRgb(h, s, v) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var Col = require('react-bootstrap/lib/Col') | |
| var PageHeader = require('react-bootstrap/lib/PageHeader') | |
| var React = require('react') | |
| var Row = require('react-bootstrap/lib/Row') | |
| var {connect} = require('react-redux') | |
| var {reduxForm} = require('redux-form') | |
| var DateInput = require('./DateInput') | |
| var FormField = require('./FormField') | |
| var LoadingButton = require('./LoadingButton') |