Skip to content

Instantly share code, notes, and snippets.

@strass
strass / test.tsx
Created April 5, 2019 20:52
charm trees
import React, { RefObject } from 'react'
import { storiesOf } from '@storybook/react'
import D3Playground from '.'
// import * as dagreD3 from 'dagre-d3'
import * as d3 from 'd3'
import * as d3dag from 'd3-dag'
import { LinkVerticalStep } from '@vx/shape'
import { lightpurple } from '../TreeGraph/colors'
// import NetworkGraph from '../NetworkGraph'
// import TreeGraph from '../TreeGraph';
FROM python:3.7-buster
ARG USERNAME=developer
# On Linux, replace with your actual UID, GID if not the default 1000
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN echo "Starting Build" \
&& groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& mkdir -p /home/$USERNAME/.vscode-server /home/$USERNAME/.vscode-server-insiders \
@strass
strass / gist:02b2fb32e3d790361606944694e1750e
Created June 21, 2021 23:45
fetchAppDataRegistration
export const fetchAppDataRegistration = async (
typeIndexWebIds: string[],
fetch: typeof window.fetch
) =>
await Promise.all(
typeIndexWebIds.map(async (url) => {
const typeIndexDataset = await getSolidDataset(url, { fetch });
const allThings = getThingAll(typeIndexDataset);
// I'm pretty sure we don't expect multiple TypeIndexes, but is there a better practice?
useEffect(() => {
// If we already have dataInstances loaded we don't need to run the check again
if (dataInstances.length) {
return;
}
if (profileDataset && webId) {
(async () => {
const { public: publicIndices, private: privateIndices } =
getTypeIndices(profileDataset, webId);