(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.
| // in new iframe | |
| var whitelist = { | |
| // add whitelisted globals | |
| }; | |
| var handler = { | |
| // Fundamental traps | |
| getOwnPropertyDescriptor: function(name) { | |
| var desc = Object.getOwnPropertyDescriptor(whitelist, name); |
| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
| import moysklad from 'moysklad' | |
| import csp from 'js-csp' | |
| import { take } from 'js-csp-async' | |
| let client = moysklad.createCspClient() | |
| let { customerOrder, CustomerOrder } = client | |
| async function orders () { | |
| let order, orders, orderPositions |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
(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.
| sourceMapper = require 'source-map-support' | |
| Dot = require '../../../node_modules/grunt-mocha/node_modules/mocha/lib/reporters/dot.js' | |
| module.exports = Dot | |
| ## | |
| parseLine = (line) -> | |
| [_, file, row] = line.match /file:\/\/\/(.*):(\d*)/ | |
| frame = | |
| getFileName: -> file |
| # first: | |
| lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
| sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
| # To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
| # go to /usr/local/lib and delete any node and node_modules | |
| cd /usr/local/lib | |
| sudo rm -rf node* |
| (defn group-by [f] | |
| (fn [rf] | |
| (let [groupped-value (volatile! (transient {}))] | |
| (fn | |
| ([] (rf)) | |
| ([result] | |
| (rf (rf result (persistent! @groupped-value)))) | |
| ([result input] | |
| (let [key (f input)] | |
| (vswap! groupped-value assoc! key (conj (get @groupped-value key []) input)) |
| { | |
| "ecmaFeatures": { | |
| "arrowFunctions": true, | |
| "binaryLiterals": false, | |
| "blockBindings": true, | |
| "classes": true, | |
| "defaultParams": true, | |
| "destructuring": true, | |
| "forOf": true, | |
| "generators": true, |