- WebStorm, Rider
- Partial support, not enough intelli hints
- Toggle on TypeScript language service
- VSCode
| #!/bin/bash | |
| ################################################################################ | |
| # Introduction | |
| ################################################################################ | |
| # This is an attempt at explaining how to vendor git repositories by storing | |
| # their _entire_ commit history inside of the local repository. By vendoring | |
| # dependencies using this technique, the remote repository can entirely | |
| # recreated from the local repository if the original were to be lost. | |
| # Additionally, clones of the local repository also satisfy that property. | |
| # |
| const Benchmark = require("benchmark"); | |
| console.log("setup"); | |
| var suite = new Benchmark.Suite(); | |
| class TestInheritance extends Set { | |
| constructor() { super() } | |
| op(q) { this.add(q) } | |
| } |
| import alias from "@rollup/plugin-alias"; | |
| import commonjs from "@rollup/plugin-commonjs"; | |
| import resolve from "@rollup/plugin-node-resolve"; | |
| import typescript from "@rollup/plugin-typescript"; | |
| import { createFilter } from "@rollup/pluginutils"; | |
| import surplusCompiler from "surplus/compiler"; | |
| function surplus({ include, exclude, sourceMap = false }) { | |
| const filter = createFilter(include, exclude); |
| type UnionToIntersection< | |
| T, | |
| U = T extends unknown ? { _: { [_ in T & PropertyKey]: never } } : {}, | |
| V = keyof U[keyof U], | |
| // We need to remove the primitive we branded T with when we made it a | |
| // property key. However, if the union T contains a branded type already, | |
| // we must avoid stripping those brands off. | |
| X = true extends (T extends PropertyKey ? true : never) ? never : PropertyKey | |
| > = T extends never ? never : V extends X & infer W ? W : V; |
by Bruce Pascoe - 1 May, 2019
"A monad is just a monoid in the category of endofunctors. What's the problem?" ~James Iry[^1]
The problem... is that there are several problems.
It's been said that monads bear a dreadful curse. Once you finally understand what they are, you begin to see them everywhere--but somehow become completely incapable of explaining them to anyone else. Many tutorial writers have tried to break the Great Curse--the Web is lousy with bold attempts and half successes that attest to this--and just as many have failed. Well, I'm here to address the elephant in the room[^2] and tell you that I intend to break the Great Curse once and for all.
There are basically two ways a monad tutorial tends to go. One is a paragraph or two of minimal descriptions of one or two common monads (Haskell's Maybe in particular is very popular), followed by a lot of intimidating Haskell syntax trying to explain--precisely--how it all fits together. This is well
| # To be used with current stable/prometheus-operator helm chart on kops clusters | |
| # where 4001/4002 ports are blocked from the worker nodes | |
| # | |
| # In you helm, disable etcd monitor by setting kubeEtcd.enabled=false | |
| # Then apply this yaml, and you should see the etcd stats on your main instance | |
| # | |
| apiVersion: monitoring.coreos.com/v1 | |
| kind: Prometheus | |
| metadata: | |
| name: prometheus-operator-prometheus-master |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |