Skip to content

Instantly share code, notes, and snippets.

View rwv's full-sized avatar
😴
sleepy...

rwv rwv

😴
sleepy...
View GitHub Profile
@rwv
rwv / write-file-from-stream.ts
Created April 16, 2025 13:13
Tauri wrtie file from ReadableStream
import { writeFile, type WriteFileOptions } from '@tauri-apps/plugin-fs'
export async function writeFileFromStream(
path: string | URL,
stream: ReadableStream<Uint8Array>,
options?: WriteFileOptions & { chunkSize?: number }
) {
const chunkSize = options?.chunkSize ?? 1024 * 1024 // 1MB in bytes
const reader = stream.getReader()
@rwv
rwv / remove.js
Last active February 7, 2025 02:28
Remove old GitHub Actions artifacts
// Script to delete old GitHub Actions artifacts from the 'user/repo' repository
const githubToken = 'github_pat_xxxxxxx'; // Replace with your GitHub token
const headers = {
'Accept': 'application/vnd.github.v3+json',
'Authorization': `Bearer ${githubToken}`,
'User-Agent': 'ArtifactsCleaner/1.0'
};
@rwv
rwv / dogecoin_icon.svg
Created May 22, 2022 13:33
Doge Coin Icon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rwv
rwv / 爱发电_icon.svg
Created May 22, 2022 13:26
爱发电 图标 SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Privacy Policy for AppStorify

At AppStorify, accessible from AppStorify, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by AppStorify and how we use it.

If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.

This Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in AppStorify. This policy is not applicable to any information collected offline or via channels other than this website. Our Privacy Policy was created with the help of the Free Privacy Policy Generator.

Consent

@rwv
rwv / mount_unc_and_get_drive_letter.bat
Created May 22, 2019 06:35
Mount UNC path to an available drive and get drive letter
:: mount unc_path to an available drive and get the drive letter
set unc_path=\\ShareHost\ShareFolder
echo unc_path:%unc_path%
net use * %unc_path%
echo mount %unc_path% to available drive
for /f "tokens=2,3" %%i in ('net use') do if '%%j=='%unc_path% set drive_letter=%%i
echo mount to %drive_letter%
@rwv
rwv / get_the_latest_file.bat
Created May 22, 2019 06:35
Get the latest file in directory
set dir_path=.\
for /f "delims=" %%i in ('dir /b/a-d/od/t:c %dir_path%') do set filename=%%i
echo the latest file: %filename%
@rwv
rwv / add_text_to_file_without_new_line.bat
Created May 22, 2019 06:34
do not add new line at the end of "EOF"
:: do not add new line at the end of "EOF"
echo|set /p="EOF" >> "%filename%"
echo add EOF to %filename%
@rwv
rwv / DOSBOX导引GUI V1.0说明文件.txt
Created October 6, 2018 14:41
DOSBOX导引GUI V1.0说明文件.txt
GUI界面说明
类型选择-
如其所言 SPG=战旗 ALL=全部
运行选项-
拉伸模式 全屏下会拉伸扩充到全屏 其他不用解释了吧
如果是在DOSBOX0.63(或者一些自制版本下则无效)
排序选择-
@rwv
rwv / game_info.json
Created September 15, 2018 19:36
dos game info
[
{
"type": "SIM",
"name": "1000公里",
"folder": "1000m",
"exe": "runme.bat",
"para1": "no",
"para2": "no",
"dosbox_para": [
"cpucy",