This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # CJK font test for QEMU — 可配置字体测试 (16x16 / 32x32 / nerd) | |
| # | |
| # 用法: | |
| # bash test-cjk.sh # 默认测试 16x16 字体,0° 旋转 | |
| # bash test-cjk.sh 2 # 兼容旧用法:旋转 180° | |
| # bash test-cjk.sh --font 32x32 # 测试 32x32 字体(需数据补丁 + 高分辨率) | |
| # bash test-cjk.sh --font32 # 一键 32x32:自动设 2560x1440 + virtio-gpu | |
| # bash test-cjk.sh --font 16x16,32x32 # 依次测试多个字体(每个字体一次 QEMU 启动) | |
| # bash test-cjk.sh --font nerd # 测试 nerd font(需先放入字体源文件) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ===UserScript== | |
| // @name EnhanceVerticalTab | |
| // @description EVT | |
| // @include main | |
| // @author Bigshans | |
| // @version 2024/7/16 21:44 增加对标签抓取的支持,以及目前 positionend 的修复 | |
| // ==/UserScript== | |
| window.addEventListener("MozAfterPaint", function () { | |
| if (gBrowserInit.delayedStartupFinished) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import PyPDF2 | |
| import sys | |
| class PdfDirGenerator: | |
| def __init__(self, pdf_path:str, txt_path:str, offset:int, out_path:str=None, levelmark:str='.'): | |
| self.pdf_path = pdf_path # pdf路径 | |
| self.txt_path = txt_path # 包含pdf目录信息的txt | |
| self.offset = offset # 目录页数偏移量 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // lauch a web page in electron | |
| const { app, BrowserWindow } = require("electron"); | |
| const url = require("url"); | |
| const fs = require("fs"); | |
| const http = require("http"); | |
| const path = require("path"); | |
| const Readable = require("stream").Readable; | |
| const BASE_PORT = 8000; | |
| let port = BASE_PORT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Vertical Tabs Pane | |
| // @version 1.6.9 | |
| // @author aminomancer | |
| // @homepage https://github.com/aminomancer/uc.css.js | |
| // @description Create a vertical pane across from the sidebar that functions | |
| // like the vertical tab pane in Microsoft Edge. It doesn't hide the tab bar | |
| // since people have different preferences on how to do that, but it sets an | |
| // attribute on the root element that you can use to hide the regular tab bar | |
| // while the vertical pane is open, for example :root[vertical-tabs] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <!-- | |
| Noto Mono + Color Emoji Font Configuration. | |
| Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole. | |
| Usage: | |
| 0. Ensure that the Noto fonts are installed on your machine. | |
| 1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name salf.uc.js | |
| // @include main | |
| // @version 3.4 | |
| // @note github.com/thepante | |
| // ==/UserScript== | |
| /* - - - - - - - - - - - SETTINGS - - - - - - - - - - - - - - - */ | |
| const float_mode = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| URL="https://wttr.in/" | |
| URLv2="https://v2.wttr.in/" | |
| URLv3="https://v3.wttr.in/" | |
| Help() | |
| { | |
| echo -e " | |
| Write 'wttr {your+city+name}' to check the weather condition of your city. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class BigDecimal { | |
| DECIMALS: number; | |
| ROUNDED: boolean; | |
| SHIFT: BigInt; | |
| _n: BigInt; | |
| constructor(value: number | string | BigDecimal | BigInt); | |
| static fromBigInt(bigint: BigInt): BigDecimal; | |
| add(num: number | string | BigDecimal | BigInt): BigDecimal; | |
| substract(num: number | string | BigDecimal | BigInt): BigDecimal; | |
| static _divRound(dividend: BigInt, divisor: BigInt): BigDecimal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Number.prototype.toFixed = function (n) { | |
| if (n > 20 || n < 0) { | |
| throw new RangeError('toFixed() digits argument must be between 0 and 20'); | |
| } | |
| const number = this; | |
| if (isNaN(number) || number >= Math.pow(10, 21)) { | |
| return number.toString(); | |
| } | |
| if (typeof (n) == 'undefined' || n == 0) { | |
| return (Math.round(number)).toString(); |
NewerOlder