All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
class RecursiveDescentParser<T extends { type?: string }> { | |
private readonly tokens: T[]; | |
private current = 0; | |
constructor(tokens: T[]) { | |
this.tokens = tokens; | |
} | |
/** | |
* Check if the current token matches one of the given types |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Greet</title> | |
</head> | |
<body> | |
Hello! |
echo Finding latest version... | |
v=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') | |
echo Downloading binary v$v... | |
wget -q -O code-server.deb "https://github.com/coder/code-server/releases/download/v$v/code-server_${v}_armhf.deb" | |
echo "Done! Run run 'sudo dpkg -i code-server.deb' to install" |
from scratchclient import ScratchSession | |
import re | |
session = ScratchSession("your_username", "your_password") | |
ms = session.get_messages() | |
for m in ms: | |
if m.type == "addcomment": | |
frag = re.sub(r"\&\#39;", "'", m.comment_fragment) | |
frag = re.sub(r"\"", '"', frag) |
import re | |
regex = re.compile(r'(["\']).*?(?<!\\)(\\\\)*?\1') |