Skip to content

Instantly share code, notes, and snippets.

View wyfdev's full-sized avatar

YufengW wyfdev

View GitHub Profile
@wyfdev
wyfdev / 2019-https-localhost.md
Created March 5, 2021 08:18 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@wyfdev
wyfdev / countdown.html
Created January 15, 2022 11:38
count down page
<!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>Countdown</title>
<style>
body {
font-family: Hiragino Sans GB, Microsoft YaHei, Lucida Grande, Lucida Sans Unicode, WenQuanYi Micro Hei, Verdana, Aril, sans-serif;
"""
Hierarchical text splitter using regex delimiters.
Delimiters are specified as a list of (pattern, name) tuples, ordered from highest to lowest level.
The splitter recursively divides text into chunks using these delimiters.
Splitting logic:
1. Prefer splitting at the highest delimiter level, ensuring resulting chunks do not exceed chunk_size.
2. Merge adjacent chunks at the same level if their combined length is within chunk_size.
3. If a chunk remains too large, recursively split it using the next lower delimiter level.