Skip to content

Instantly share code, notes, and snippets.

//Typescript version of Rust's Result type
interface IValue<T> {
type: 'value'
value: T
}
interface IError<E extends Error> {
type: 'error'
error: E
}
import {Configuration, ModelError, PlaidApi, PlaidEnvironments} from "plaid";
import axios, {AxiosRequestConfig, AxiosResponse} from 'axios'
import * as fs from 'fs/promises'
const ENV = process.env
const PLAID_ENV = ENV.PLAID_ENV!
export class PlaidError extends Error {
name = 'PlaidError'
@kurtbuilds
kurtbuilds / setup.sh
Last active December 31, 2022 18:42
Kurt's Rust command line tooling
cargo install just
cargo install --git https://github.com/kurtbuilds/req
cargo install --git https://github.com/kurtbuilds/sd
cargo install --git https://github.com/kurtbuilds/jq
cargo install --git https://github.com/kurtbuilds/watchexec-simple
cargo install modenv
cargo install checkexec
cargo install dye-cli
cargo install ormlite
cargo install --git https://github.com/kurtbuilds/toml-cli
# Rust replacements
function find() {
echo $(dye -r WARN) Try using fd instead. >&2
/usr/bin/find "$@"
}
function sed() {
echo $(dye -r WARN) Try using sd instead. >&2
/usr/bin/sed "$@"
}