(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.
| /** | |
| * If argument is a string, try to parse as JSON. | |
| * Otherwise return null. | |
| */ | |
| export function parseOrNull(raw: unknown) { | |
| if (!raw) return null | |
| if (typeof raw === 'string') { | |
| try { | |
| return JSON.parse(raw) |
| # This is a multi-stage build to not spill the contents of the deploy_key | |
| FROM mhart/alpine-node:10 as base | |
| # We need git and openssh to resolve `git+ssh` links in package.json | |
| RUN apk update \ | |
| && apk add git openssh | |
| WORKDIR /usr/src | |
| COPY package*.json ./ |
| // this code is safe to copy/paste into your browser | |
| // but you should really try to write it out line-by-line ;) | |
| // this gist is based on a number of other excellent introductions to lambda calculus | |
| // classic: https://github.com/sjsyrek/presentations/blob/master/lambda-calculus/lambda.js | |
| // ornithology: https://www.youtube.com/watch?v=3VQ382QG-y4&t=3349s | |
| // and this one, in Ruby, called "Programming With Nothing" (excellent title) https://www.youtube.com/watch?v=VUhlNx_-wYk | |
| pair = x => y => a => a(x)(y) |
(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.
| " ---------------------- USABILITY CONFIGURATION ---------------------- | |
| " Basic and pretty much needed settings to provide a solid base for | |
| " source code editting | |
| " don't make vim compatible with vi | |
| set nocompatible | |
| " turn on syntax highlighting | |
| syntax on | |
| " and show line numbers |