Skip to content

Instantly share code, notes, and snippets.

View craigtracey's full-sized avatar

Craig Tracey craigtracey

View GitHub Profile
@craigtracey
craigtracey / EntityPage.tsx
Created October 17, 2024 15:36
Boilerplate EntityPage.tsx from a new `npx @backstage/create-app@latest` invocation.
import React from 'react';
import { Button, Grid } from '@material-ui/core';
import {
EntityApiDefinitionCard,
EntityConsumedApisCard,
EntityConsumingComponentsCard,
EntityHasApisCard,
EntityProvidedApisCard,
EntityProvidingComponentsCard,
} from '@backstage/plugin-api-docs';
[{"id":1563923054655,"title":"\"Cornbread\" Stuffing","body_html":"\u003cb\u003eIngredients:\u003c\/b\u003e onion, celery, coconut flour, crutons, egg, coconut milk, coconut oil, tapioca flour, broth, apple cider vinegar, maple syrup, baking soda, olive oil, thyme, sage, rosemary, pepper, salt\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"font-size: 14px\" class=\"label label-warning\"\u003epaleo\u003c\/span\u003e ","vendor":"Tru Provisions","product_type":"dish","created_at":"2018-11-01T16:45:59-04:00","handle":"cornbread-stuffing","updated_at":"2019-10-28T16:38:01-04:00","published_at":"2019-10-28T12:38:01-04:00","template_suffix":null,"tags":"friday, saturday, thursday","published_scope":"web","variants":[{"id":31060160512063,"product_id":1563923054655,"title":"Single Serving \/ 10-31-2019","price":"12.00","sku":"","position":1,"inventory_policy":"continue","compare_at_price":null,"fulfillment_service":"manual","inventory_management":"shopify","option1":"Single Serving","option2":"10-31-2019","option3":nul
{"count": 1,
"products":[{"id":1563923054655,"title":"\"Cornbread\" Stuffing","body_html":"\u003cb\u003eIngredients:\u003c\/b\u003e onion, celery, coconut flour, crutons, egg, coconut milk, coconut oil, tapioca flour, broth, apple cider vinegar, maple syrup, baking soda, olive oil, thyme, sage, rosemary, pepper, salt\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"font-size: 14px\" class=\"label label-warning\"\u003epaleo\u003c\/span\u003e ","vendor":"Tru Provisions","product_type":"dish","created_at":"2018-11-01T16:45:59-04:00","handle":"cornbread-stuffing","updated_at":"2019-10-28T16:38:01-04:00","published_at":"2019-10-28T12:38:01-04:00","template_suffix":null,"tags":"friday, saturday, thursday","published_scope":"web","variants":[{"id":31060160512063,"product_id":1563923054655,"title":"Single Serving \/ 10-31-2019","price":"12.00","sku":"","position":1,"inventory_policy":"continue","compare_at_price":null,"fulfillment_service":"manual","inventory_management":"shopify","option1":"Single Serving","option2":"1
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
class CustomObject(object):
@classmethod
def from_dict(cls, obj):
local_dict = {}
for a, v in obj.items():
if isinstance(v, dict):
local_dict[a] = cls._attribute_types[a][0].from_dict(v)
elif isinstance(v, list):
subtype = cls._attribute_types[a][1]
---
name: vagrant-vbox-bionic-calico
description: A local test provisioner
provisioner_name: vagrant
provisioner_args:
box: generic/ubuntu1804
env:
VAGRANT_DEFAULT_PROVIDER: virtualbox
ansible_overrides:
docker_debian_version: 18.03.1~ce~3-0~ubuntu
{
"Belmont": [
"02452",
"02478",
"02479"
],
"Norwood": [
"02062"
],
"East Cambridge": [
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document id="root_doc">
<Schema name="duplicate" id="duplicate">
<SimpleField name="ZCTA5CE10" type="string"></SimpleField>
<SimpleField name="AFFGEOID10" type="string"></SimpleField>
<SimpleField name="GEOID10" type="string"></SimpleField>
<SimpleField name="ALAND10" type="float"></SimpleField>
<SimpleField name="AWATER10" type="float"></SimpleField>
</Schema>
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document id="root_doc">
<Schema name="output" id="output">
<SimpleField name="FID" type="float"></SimpleField>
</Schema>
<Folder><name>output</name>
<Placemark>
<Style><LineStyle><color>0</color></LineStyle><PolyStyle>ff0000ff</PolyStyle></Style>
<ExtendedData><SchemaData schemaUrl="#output">