Inspired by Haskell, I wanted to see if I could replicate, using ES6 features, the repeat
function:
repeat :: a -> [a]
So as you can see in repeat.js
, I have done exactly that. However there are some caveats.
Inspired by Haskell, I wanted to see if I could replicate, using ES6 features, the repeat
function:
repeat :: a -> [a]
So as you can see in repeat.js
, I have done exactly that. However there are some caveats.
'use strict'; | |
var React = require('react'); | |
function createAsyncHandler(getHandlerAsync, displayName) { | |
var Handler = null; | |
return React.createClass({ | |
displayName: displayName, |
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
'use strict'; | |
var dom = require('xmldom').DOMParser, | |
select = require('xml-crypto').xpath, | |
c14n = require("xml-c14n")(); | |
var canonicaliser = c14n.createCanonicaliser("http://www.w3.org/2001/10/xml-exc-c14n#"); | |
var doc = new dom().parseFromString( | |
'<root xmlns:ds="http://www.w3.org/2000/09/xmldsig#">' + |
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>React Interval</title> | |
</head> | |
<body> | |
<div id="app"></div> |
/* Turn this */ | |
router.get("/api/products/:id", function(req, res) { | |
Product.getProduct(req.params.id, function(err, products) { | |
if (err) { | |
res.status(404).json({"message": "Not Found"}); | |
} | |
else { | |
res.status(200).json(products); | |
} | |
}); |
┐┌┐┌┐ | |
┘└┘└┘\ₒ/ | |
┐┌┐┌┐ ∕ Friday | |
┘└┘└┘ノ) | |
┐┌┐┌┐ deploy, | |
┘└┘└┘ | |
┐┌┐┌┐ good | |
┘└┘└┘ | |
┐┌┐┌┐ luck! | |
│││││ |
One word: task automation. It's basically zero effort and you can use the ./task.js package manager to handle any repetitive tasks. You can use ./task.js
to automate everything with minimum effort.
./task.js
provides the structure, order, and authority that you as a developer so desperately crave.
./task.js
will also take responsibility for your actions if you need it to. It's what everybody is using now.
./task.js
is the new hotness. It's all about ./task.js
now, just like that.
This is compared to npm run/bash scripts, which are:
To avoid ../../../views/layout you can set jade's basedir | |
config variable: app.locals.basedir = __dirname + '/views'; | |
and after that you should use 'absolute' (absolute from basedir) | |
paths in your views, eg: extends /layout |