Skip to content

Instantly share code, notes, and snippets.

View BrianLitwin's full-sized avatar

Brian Litwin BrianLitwin

View GitHub Profile
const typeToCap = (type) => {
switch (type) {
case "PERSON":
return "Person";
case "CONTRIBUTION":
return "Contribution";
case "PRIORITY":
return "Priority";
}
};
communication =
kris = instance.addPerson("Kris", "");
josh = instance.addPerson("Josh", "");
jeff = instance.addPerson("Jeff", "");
will = instance.addPerson("Will", "");
zoltan = instance.addPerson("Zoltan", "");
// prefix: N.Prefix.label,
const labelNodeType = Object.freeze({
name: "Label",
pluralName: "Labels",
prefix: N.Prefix.label,
defaultWeight: 2,
description: "Label for a GitHub issue"
})
  • add node/nodes to the graph
  • add a node/nodes/edges to the Repo

function addNode(node) {

}

function search(term) {

}

import React from 'react';
describe("MainPage", () => {
const chapter = () => {
title: "chapter 1",
text: ""
}
it("button clicks show correct panes", () => {
g.add_node('src')
g.add_node('dst')
g.add_edge('src', 'dst')
g.add_edge('src', 'dst')
g.add_node('loop')
g.add_edge('loop', 'loop')
g.add_node('isolated')

A promise is an object representing the eventual completion or failure of an asynchronous operation Essentially, a promise is a returned object onto which you attach callbacks, instead of passing callbacks into a function

How to write createAudioFileAsync(audioSettings, successCallback, failureCallback) using Promises? createAudioFileAsync(audioSettings).then(successCallback, failureCallback) or

const promise = createAudioFileAsync(audioSettings); 
promise.then(successCallback, failureCallback);

return a better error message w/ multiple arguments

should makeClear return a Promise? function removeDir(p: string): Promise should be the signature

  1. make an easy input system w/ no additional features
  2. figure out flexible persistence method for exercises
  3. create the data model to access things in O(log n)

exercise container types: normal circuit density compound exercise superset