Skip to content

Instantly share code, notes, and snippets.

View lighth7015's full-sized avatar
Perpetually exhausted.

Robert Butler lighth7015

Perpetually exhausted.
View GitHub Profile

Angular compile message(s):

Error: src/app/app.component.html:74:2 - error NG8001: 'app-page' is not a known element:
1. If 'app-page' is an Angular component, then verify that it is part of this module.
2. If 'app-page' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

74  <app-page></app-page>
    ~~~~~~~~~~
[{
"id": 99,
"account": {
"first": "First",
"middle": "",
"last": "Last",
"email": "[email protected]",
"email_verified_at": {
"$date": "2022-01-04T23:49:25"
@lighth7015
lighth7015 / cors.php
Created May 12, 2022 15:19
config/cors.php
<?php
/**
* ------------------------------------------------------------------------------------
* Cross-Origin Resource Sharing (CORS) Configuration
* ------------------------------------------------------------------------------------
*
* Here you may configure your settings for cross-origin resource sharing or CORS. This
* determines what cross-origin operations may execute in web browsers. You are free to
* adjust these settings as needed.
*
# The Caddyfile is an easy way to configure your Caddy web server.
# https://caddyserver.com/docs/caddyfile
#
# The configuration below serves a welcome page over HTTP on port 80. To use your
# own domain name (with automatic HTTPS), first ensure that your domain's A/AAAA
# DNS records are properly pointed to this machine's public IP, simply replace the line below with your
# domain name.
#
# https://caddyserver.com/docs/caddyfile/concepts#addresses
@lighth7015
lighth7015 / template.php
Last active October 23, 2022 03:01
Issue querying for namespaced child fragments.
<?php
$template =<<<EOF
<!DOCTYPE html>
<html xmlns:x="http://schema.hpprx.com/schemas">
<head></head>
<body>
<div x:for-each="(foo, i) of bar">
a
</div>
</body>
@lighth7015
lighth7015 / DialogProvider.tsx
Created February 23, 2024 02:09
Dialog Provider
import React, { createContext, useContext, useState, FunctionComponent, useEffect } from 'react';
import { Dialog, Button } from '@mui/material';
type DialogProviderProps = React.PropsWithChildren;
type DialogContent = { component: FunctionComponent<any> | null; props: any; };
type ShowDialogFn = ( component: FunctionComponent<any>, props?: any ) => void;
type DialogCtx = { showDialog: ShowDialogFn; closeDialog: VoidFunction; open: boolean; content: DialogContent; };
const DialogContext = createContext<DialogCtx | undefined>( undefined );