This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LanguageSupport, LRLanguage } from '@codemirror/language'; | |
import { LRParser } from '@lezer/lr'; | |
import { Input, parseMixed, SyntaxNodeRef } from '@lezer/common'; | |
import { htmlLanguage } from '@codemirror/lang-html'; | |
import {javascript} from '@codemirror/lang-javascript'; | |
import {CodeMirrorExtensionElement} from 'codemirror-elements/lib/cm-extension-element.js'; | |
function mixedTaggedTemplate(node: SyntaxNodeRef, input: Input) { | |
const isTaggedTemplate = node.type.name === "TaggedTemplateExpression"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Definition for a binary tree node. | |
* class TreeNode { | |
* val: number | |
* left: TreeNode | null | |
* right: TreeNode | null | |
* constructor(val?: number, left?: TreeNode | null, right?: TreeNode | null) { | |
* this.val = (val===undefined ? 0 : val) | |
* this.left = (left===undefined ? null : left) | |
* this.right = (right===undefined ? null : right) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# git-evolve: | |
# A custom Git command to rebase a sequence of branches in order over a base branch. | |
# It also supports the ability to continue after conflicts and check the current status of the evolution. | |
# | |
# Installation Instructions for zsh env: | |
# 1. Save this script to a location, e.g., ~/bin/git-evolve. | |
# 2. Make sure the script is executable: chmod +x ~/bin/git-evolve. | |
# 3. Add the following line to your .zshrc or .zshenv: export PATH="$HOME/bin:$PATH". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<script type="module" src="./simple-greeting.js"></script> | |
</head> | |
<body> | |
<simple-greeting name="World"></simple-greeting> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.69/dist/themes/light.css"> | |
<script type="module" src="./material-box-shadow.js"></script> | |
<style> | |
:root { | |
font-family: Roboto, sans-serif; | |
} | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<script type="module" src="./trom-bone.js"></script> | |
<style> | |
:root { | |
font-family: Arial; | |
} | |
</style> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const updateMetadata = ({ | |
title, | |
description, | |
url, | |
image, | |
imageAlt | |
}: { | |
title?: string, | |
description?: string, | |
url?: string, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"serve": "web-dev-server --node-resolve --watch --open", | |
}, | |
"devDependencies": { | |
"@web/dev-server": "^0.1.17" | |
}, | |
"dependencies": { | |
"lit": "^2.0.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"build": "tsc", | |
"build:watch": "npm run build -- --watch", | |
"serve": "web-dev-server --node-resolve --watch --open", | |
"dev": "npm run build:watch & npm run serve" | |
}, | |
"devDependencies": { | |
"@web/dev-server": "^0.1.17", | |
"typescript": "^4.2.4" |
NewerOlder