Skip to content

Instantly share code, notes, and snippets.

​// 打印原始 URL 用于调试
console.log('Request URL:', request.url);
// 使用 new URL 解析请求路径,避免手动切片
const url = new URL(request.url);
let filePath = decodeURIComponent(url.pathname); // 提取路径部分并解码
// 在 Windows 上,pathname 可能以斜杠开头(如 /C:/path),需要清理
if (path.sep === '\\' && filePath.startsWith('/')) {
filePath = filePath.slice(1); // 移除开头的斜杠
@vikingmute
vikingmute / tax.md
Created March 4, 2025 10:14
一人公司税收

好的!以下是基于最新政策(2023年公告)对个人独资企业一人有限责任公司在月销售额10万元、月利润5万元情况下的税收比较分析。


一、假设条件

  • 月销售额:10万元。
  • 月利润:5万元。
  • 年销售额:10万 × 12 = 120万元。
  • 年利润:5万 × 12 = 60万元。
  • 企业类型

You are an expert TypeScript/Next.js developer focused on writing clean, maintainable code. Prioritize these qualities:

  • Minimal - Absolute minimum code needed
  • Self-documenting - Code explains itself through:
    • Precise naming (verbs for functions, nouns for variables)
    • Single-responsibility components
    • Obvious data flow
    • Add short comments when necessary
  • Type-Exact - Strict TypeScript types with zero 'any'
  • Secure - Built-in security for auth/data handling
类别 药品通用名 原研品牌
抗生素类 头孢克洛 希刻劳
头孢呋辛 西力欣
左氧氟沙星 可乐必妥
莫西沙星 拜复乐
阿奇霉素 希舒美
头孢妥仑匹酯 美爱克
抗真菌类 盐酸特比萘芬 兰美抒
奥美拉唑 洛赛克

1. 常用药物

感冒/发烧类

  • 布洛芬(退烧、止痛)
  • 对乙酰氨基酚(泰诺)

抗病毒/流感类

  • 奥司他韦(达菲,需处方)

消炎类

  • 阿莫西林(需处方)
  • 红霉素软膏(外用)
# 字体设置
font-family = BlexMono Nerd Font Mono
font-size = 16
# 主题和样式
theme = GruvboxDarkHard
cursor-style = block
adjust-cell-height = 35%
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Backbone.js Todos</title>
<link rel="stylesheet" href="todos.css"/>
</head>
<body>
<script src="../../test/vendor/json2.js"></script>
import '@testing-library/jest-dom/extend-expect'
import React from 'react'
import { render, RenderResult, fireEvent, wait, createEvent } from '@testing-library/react'
import axios from "axios"
import { Upload, UploadProps } from './upload'
jest.mock('axios')
const mockedAxios = axios as jest.Mocked<typeof axios>
jest.mock('../Icon/icon', () => {
@vikingmute
vikingmute / gist:67a2168f0a67f6b70defe4fb3cff1e5c
Created March 14, 2017 09:15
how to render two components based on one url
// hey, I wanna show Home Component & Modal Component when url is /edit-profile
// method one
<Route path="/" component={HomePage} />
<Route path="/edit-profile" component={EditModal} />
// this will work, but when I adding another route&component like below
// when go to '/about', both Home and About will show up, I assume these are two different pages
<Route path="/" component={HomePage} />
<Route path="/about" component={AboutPage} />