Skip to content

Instantly share code, notes, and snippets.

View bru02's full-sized avatar

Brúnó Salomon bru02

View GitHub Profile

Installing basictex, chktex, latexindent.pl on MacOS

Useful for using seting up Latex workshop for VSCode on Macs.

The easy part

brew install basictex latexindent

And chktex....

Step 1. Download the latest version from here: https://www.nongnu.org/chktex/, & un(g)zip it

type Fields = Record<string, string>;
type EqualCondition = ["eq", string, string] | Record<string, string>;
type StartsWithCondition = ["starts-with", string, string];
type ContentLengthRangeCondition = ["content-length-range", number, number];
export type PolicyEntry =
| EqualCondition
@bru02
bru02 / firebase-migrate-example.ts
Created April 6, 2021 19:32
Example of renaming files in storage & moving data to a sub-collection via a single-use cloud function
import * as functions from "firebase-functions";
import * as firebase from "firebase-admin";
import express from "express";
import {uuid} from "uuidv4";
import uniq from "lodash/uniq"
import uniqBy from "lodash/uniqBy";
const fieldValue = firebase.firestore.FieldValue;
const app = express();