This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ---------------------- 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 |
(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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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) |