Skip to content

Instantly share code, notes, and snippets.

View AnnAngela's full-sized avatar
🎮
Playing Final Fantasy XIV Endwalker

AnnAngela AnnAngela

🎮
Playing Final Fantasy XIV Endwalker
View GitHub Profile
@AnnAngela
AnnAngela / airscript.v1.d.ts
Last active October 7, 2025 14:22
金山文档 AirScript 类型文件 1.0 + 2.0 @ 2025.10.07
/**
* 提取自[金山文档 AirScript 网页编辑器]{@link https://solution-cdn.wpscdn.cn/open/kscript/432.8ac8608e.js},提取日期为 2025.10.07
* 由于 AirScript 的使用方式相当灵活,本类型文件仅供参考
*/
/* eslint-disable @typescript-eslint/no-namespace */
declare const Application: Application;
/**
* 当前活动工作表,可以通过 Sheet.Activate()来切换活动工作表。该属性返回Sheet对象,能利用该属性操作当前活动工作表。
* @remarks 运行脚本的环境是独立在服务器的,因此脚本运行环境的 ActiveSheet 与用户环境的 ActiveSheet 不一定相同。
* @remarks 具体规则是:
@AnnAngela
AnnAngela / index.js
Created May 25, 2020 03:44
A simple seeded random number generator for JavaScript based on davidbau/seedrandom
/*
* A simple seeded random number generator for JavaScript based on davidbau/seedrandom
* which can be found at https://github.com/davidbau/seedrandom/blob/released/seedrandom.js
* This code is made in modern JavaScript and only keep the Math.random-like function `#next`.
*/
/*
Copyright 2019 David Bau.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including

ContentHandler

The ContentHandler facility adds support for arbitrary content types on wiki pages, instead of relying on wikitext for everything. It was introduced in MediaWiki 1.21.

Each kind of content ("content model") supported by MediaWiki is identified by unique name. The content model determines how a page's content is rendered, compared, stored, edited, and so on.

Built-in content types are:

  • wikitext - wikitext, as usual
  • javascript - user provided javascript code
@AnnAngela
AnnAngela / readme.md
Created March 26, 2020 08:11
Bilibili's bv(bvid) <==> av(aid) convertor

参考了mcfx的算法bvidToAid方法将bv号转换成av号,aidToBvid方法将av号转换成bv号。

@AnnAngela
AnnAngela / Simulator.ts
Last active March 24, 2020 14:35
Simulator For "Darts in Higher Dimensions (with 3blue1brown) - Numberphile"
interface QuestionResultType {
sumOfScore: number;
loopCount: number;
scoreExpection: number;
}
interface QuestionResult {
thisTime: QuestionResultType;
total: QuestionResultType;
}
abstract class Question {
@AnnAngela
AnnAngela / demo.html
Last active January 21, 2020 14:00
Auto-expand textarea
<html>
<head></head>
<body>
<textarea></textarea>
<hr>
<div contenteditable="true" style="
-webkit-writing-mode: horizontal-tb;
text-rendering: auto;