Skip to content

Instantly share code, notes, and snippets.

View dart200's full-sized avatar

Nick Swenson dart200

View GitHub Profile
@dart200
dart200 / keybase.md
Created September 19, 2019 02:36
Keybase Proof

Keybase proof

I hereby claim:

  • I am dart200 on github.
  • I am dart200 (https://keybase.io/dart200) on keybase.
  • I have a public key ASCfEOPzvlP9nxWIH9JWugLhVetpxAJhMh8omiqQnU__1go

To claim this, I am signing this object:

right now, i'm writing some promise code that looks like this. i need to both store the unsubscribe function returned from the subcribtion, as well as wait for the subscriber callback to run once before proceeding, and it looks pretty ugly:

let chatLoaded = false; // don't start loading messages until chat info has loaded
await new Promise(resolve =>
  unsubs.push(
    chatRef.onSnapshot(
      doc => {
        uiStore.receiveChat(doc.data());
@dart200
dart200 / gist:1f7fd4eeef55212ac3926c93b0b42c77
Last active January 14, 2021 13:37
note on setting up mac dev env
install homebrew from website script
// setup fish
$ brew install fish
-> to /etc/shells add /usr/local/bin/fish
$ chsh -s /usr/local/bin/fish
// setup terminal
setup terminal
-> install ubuntu fonts