Skip to content

Instantly share code, notes, and snippets.

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);
@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?
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 / 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';
import { Editor } from 'slate-react';
import { toNumber } from 'lodash';
import Plain from 'slate-plain-serializer';
import PropTypes from 'prop-types';
import React from 'react';
class PlainTextEditor extends React.Component {
static propTypes = {
inline: PropTypes.bool,
value: PropTypes.string,
// Doesnt work (puts everything in password field):
const emailField = cy.getByLabelText('Email Address');
const passwordField = cy.getByLabelText('Password');
emailField.type('zak@x.com');
passwordField.type('password01');
// Works (types in correct inputs):
const emailField = cy.getByLabelText('Email Address');
emailField.type('zak@x.com');
const passwordField = cy.getByLabelText('Password');
$ apt-file search Xlib-xcb.h
libx11-xcb-dev: /usr/include/X11/Xlib-xcb.h
$ cat /usr/include/X11/Xlib-xcb.h
cat: /usr/include/X11/Xlib-xcb.h: No such file or directory
ERROR: CONFIG: Line 177: gaps inner all set 0
ERROR: CONFIG: ^^^^^^^^^
ERROR: CONFIG: Line 178:
ERROR: CONFIG: Line 179: # Start i3bar to display a workspace bar (plus the system information i3status
ERROR: FYI: You are using i3 version 4.12-104-g9753891 (2016-06-22, branch "gaps-next")
class PostsController < ApplicationController
# GET /posts
# GET /posts.xml
def index
@posts = Post.all
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @posts }
#routes
map.root :controller => "games", :action => "index"
# games_routing_spec
it "recognizes and generates root as #index" do
{ :get => "/" }.should route_to(:controller => "games", :action => "index")
end