Skip to content

Instantly share code, notes, and snippets.

@dannyfritz
dannyfritz / Promise_Patterns.md
Last active August 4, 2021 14:38
Promise Patterns for Happier Relationships 💍

Promises

new Promise()

  • new Promise((resolve, reject) => {})
const getDinosaur = (name) => {
  return new Promise((resolve, reject) => {
    resolve({name})
@dannyfritz
dannyfritz / setup.md
Last active June 21, 2019 15:07 — forked from w3cj/setup.md

Intro to Programming with JavaScript

Standard

Write, mentally evaluate, and store the result of JS expressions

Objectives

  • Describe what a programming language is
  • List reasons for learning JavaScript

Agile for Teams

Objectives

  • Ariticulate how Agile works in a team
  • List the roles in Scrum

Agile Review

  • Agile Manifesto What are some/all principles of Agile?

Keybase proof

I hereby claim:

  • I am dannyfritz on github.
  • I am dannyfritz (https://keybase.io/dannyfritz) on keybase.
  • I have a public key whose fingerprint is 7100 9785 AFE9 05FF 27EF 09E4 BF13 07CC 1754 90CB

To claim this, I am signing this object:

@dannyfritz
dannyfritz / example.js
Last active January 12, 2018 05:36 — forked from bthesorceror/example.js
Promises
function loadFile(filename) {
let script = ... create script with file
let promise = new Promise()
script.onload = promise.resolve
return promise
}
@dannyfritz
dannyfritz / wono.js
Last active November 25, 2021 17:46
Rebuild all dependent packages when a package is modified.
#!/usr/bin/env node
import process from "process";
import { spawn } from "child_process";
import chokidar from "chokidar";
import { readPackageUp } from "read-pkg-up";
// import { run } from '@pnpm/plugin-commands-script-runners';
chokidar
.watch(".", {