Skip to content

Instantly share code, notes, and snippets.

View hubenchang0515's full-sized avatar
:octocat:
写呀写呀写代码

Plan C hubenchang0515

:octocat:
写呀写呀写代码
View GitHub Profile
@hubenchang0515
hubenchang0515 / Shift - WebAssembly runtime for Python, Lua, Ruby and etc.md
Created December 7, 2025 15:22
Shift - WebAssembly runtime for Python, Lua, Ruby and etc.

I recently used emsdk to build interpreters for languages like Python. Then I wrote an online code editor based on WebAssembly that supports languages such as Python, Lua, and Ruby. No backend is needed, the code runs directly in the browser. Therefore, apart from the initial loading of WASM resources, there are no other network delays, and the results are displayed almost instantly. It can generate shareable links, so now I include the link when posting code online, and clicking it shows the results.

Web Site:https://shift.js.org/

Source:https://github.com/hubenchang0515/shift

@hubenchang0515
hubenchang0515 / HTML 元素标签列表.md
Created May 22, 2025 19:12
HTML 元素标签列表

HTML 元素标签列表

主根元素

元素 描述
html 表示一个 HTML 文档的根(顶级元素),所以它也被称为根元素。所有其它元素必须是此元素的后代。

文档元数据

@hubenchang0515
hubenchang0515 / Python 的内建函数.md
Last active June 17, 2025 13:16
Python 的内建函数

Python 的内建函数

Warning

虽然称为内建函数,但部分 API 并不是函数,例如 object 是类。

函数名 详细 简介
abs abs 计算绝对值
aiter aiter 获取异步可迭代对象的迭代器
all all 判断可迭代对象内容是否全部为真值
@hubenchang0515
hubenchang0515 / 随机图片API.md
Last active October 26, 2024 09:29
随机图片API
@hubenchang0515
hubenchang0515 / Parsec 代理配置.md
Last active June 6, 2025 10:58
Parsec 代理配置

Parsec 代理配置

Windows 平台上配置文件路径如下:

  • 用户安装: %appdata%\Parsec\config.txt
  • 系统安装: %ProgramData%\Parsec\config.txt

在配置文件中写入代理配置:

@hubenchang0515
hubenchang0515 / 一些常见的延迟级别.md
Created September 18, 2024 10:32
一些常见的延迟级别

一些常见的延迟级别

亚纳秒级

  • CPU 访问寄存器
  • CPU 时钟周期

纳秒级

  • 访问 L1/L2 缓存
@hubenchang0515
hubenchang0515 / Linux CUDA 驱动失效问题的解决办法.md
Last active June 16, 2024 12:21
Linux CUDA 驱动失效问题的解决办法

Linux CUDA 驱动失效问题的解决办法

在使用 Linux 的时候,如果经常进行升级,时不时会遇到驱动失效的问题:

$ nvidia-smi 
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.
@hubenchang0515
hubenchang0515 / 配置 APT 的代理.md
Last active June 6, 2025 14:37
配置 APT 的代理

配置 APT 的代理

参考 配置 APT 的代理

最近遇到 APT 连不上 docker 源的问题,需要配置 APT 的代理。

创建 /etc/apt/apt.conf.d/50proxy.conf 文件,填入代理配置:

Acquire::http::Proxy "http://ADDRESS:PORT";
@hubenchang0515
hubenchang0515 / Windows无法进行系统重置的问题.md
Last active June 14, 2024 15:20
Windows无法进行系统重置的问题

Windows无法进行系统重置的问题

Windows 的系统重置功能是通过在一个隐藏的恢复分区(通常名为 RESTORE)中保存一个恢复镜像实现的。

通过设备管理器可以看见该分区,使用 DiskGenius 可以查看该分区里的文件:

恢复分区

无法进行重置通常有两种原因:

@hubenchang0515
hubenchang0515 / Flex布局.md
Last active June 12, 2025 07:48
Flex布局

CSS 弹性布局

Flex布局

在 CSS 中通过添加 display: flex; 元素设为 Flex 布局。

元素沿着主轴排列,沿着交叉轴对齐。