(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.
/** | |
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers | |
* @author ShirtlessKirk. Copyright (c) 2012. | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
var luhnChk = (function (arr) { | |
return function (ccNum) { | |
var | |
len = ccNum.length, | |
bit = 1, |
(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.
// $ yarn add request request-promise | |
// $ node count userA userB | |
const request = require('request-promise') | |
const get = resource => request({ | |
url: /^https/.test(resource) ? resource : `https://api.github.com/${resource}`, | |
headers: { | |
'User-Agent': 'GitHub Contrib Counter', | |
'Authorization': 'token YOUR_PERSONAL_ACCESS_TOKEN' |
I'm playing around a lot nowadays with Terraform 0.13 and I found a really interesting feature and that's the ...
symbol (also called an ellipsis) to be used with for
expressions.
The operator can be used for group_by operations.
We have a list of entries. The list contains employee/manager/project triplets.