Skip to content

Instantly share code, notes, and snippets.

View xeladotbe's full-sized avatar

Alexander Martin xeladotbe

View GitHub Profile
@xeladotbe
xeladotbe / yamlCompletion.ts
Created July 2, 2023 10:36 — forked from toonvanstrijp/yamlCompletion.ts
yaml-server json7 autocomplete
/*---------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. All rights reserved.
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as Parser from '../parser/jsonParser07';
import { parse as parseYAML } from '../parser/yamlParser07';
import * as Json from 'jsonc-parser';
@xeladotbe
xeladotbe / Box.tsx
Created November 27, 2022 19:48 — forked from kripod/Box.tsx
Polymorphic `as` prop for React components with TypeScript
import React from 'react';
// Source: https://github.com/emotion-js/emotion/blob/master/packages/styled-base/types/helper.d.ts
type PropsOf<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
E extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>
> = JSX.LibraryManagedAttributes<E, React.ComponentPropsWithRef<E>>;
export interface BoxOwnProps<E extends React.ElementType = React.ElementType> {
as?: E;
{
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>Watch as I move this plane based on your position!</speak>"
},
"directives": [
{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",
{
"document": {
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
{
"document": {
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
{
"document": {
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
@xeladotbe
xeladotbe / pager.json
Created October 8, 2020 16:55
Simple pager with Navigation Buttons
{
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},
{
"type": "APL",
"version": "1.3",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},
@keyframes zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
@xeladotbe
xeladotbe / refresh-image.json
Last active April 21, 2020 07:58
APL 1.3 refresh image every 30 seconds
{
"type": "APL",
"version": "1.3",
"settings": {
"idleTimeout": 300000
},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},