Skip to content

Instantly share code, notes, and snippets.

@zhimiaoli
zhimiaoli / Adguard.list
Last active December 23, 2021 16:25
Quantumult X 规则
#adguardpremium
^https:\/\/mobile-api\.adguard\.com\/api\/1\.0\/ios_validate_receipt$ url 302 https://raw.githubusercontent.com/langkhach270389/Scripting/master/Adguard.rsp
hostname=mobile-api.adguard.com
@zhimiaoli
zhimiaoli / BaiduPanVideoPlayerSpeed.user.js
Created July 8, 2021 14:05
百度网盘视频播放变速userscript
// ==UserScript==
// @name BaiduPanVideoPlayerSpeedController
// @namespace https://lizhimiao.com/
// @version 0.1
// @description 百度网盘视频播放变速工具
// @author lizhimiao
// @include *://pan.baidu.com/play/*
// @grant none
// ==/UserScript==
@zhimiaoli
zhimiaoli / bt4g_Magnet_direct_show.user.js
Last active February 24, 2024 01:47
在bt4g.org的页面上直接显示磁力添加下载地址
// ==UserScript==
// @name bt4g Magnet direct show
// @namespace http://tampermonkey.net/
// @version 0.3
// @description 在bt4g.org的页面上直接显示磁力添加下载地址,现在仅支持详情页。
// @author lizhimiao
// @match https://bt4g.org/magnet/*
// @match https://bt4gprx.com/magnet/*
// @icon https://www.google.com/s2/favicons?domain=bt4g.org
// @grant none
@zhimiaoli
zhimiaoli / Podcast Bookmarklet.js
Created March 16, 2016 12:07
将喜马拉雅、荔枝FM转换成可订阅XML地址
javascript:(function(){if ((Id = /^http:\/\/www\.lizhi\.fm\/(\d{2,})/.exec(window.location.href))!== null) {prompt('http://nj.lizhi.fm/rss/'+Id[1]+'.xml');}else if ((Id = /^http:\/\/www\.ximalaya\.com\/.*\/album\/(\d{2,})/.exec(window.location.href))!== null) {prompt('URL','http://ximalaya.com/album/'+Id[1]+'.xml');}else if ((Id = /^http:\/\/lebo\.baidu\.com\/album\/(\d{2,})/.exec(window.location.href))!== null) {prompt('http://lebo.baidu.com/dj/rss/'+Id[1]);}else if ((Id = /^https:\/\/itunes\.apple\.com\/[a-zA-Z]+\/podcast\/.*/.exec(window.location.href))!== null) {alert('Wait a minute and check the result.');prompt('picklemonkey.net/flipper/extractor.php?feed='+window.location.href);}else{alert('Not support or wrong url!');}})()
@zhimiaoli
zhimiaoli / default.custom.yaml
Created February 16, 2016 15:32 — forked from lotem/default.custom.yaml
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: luna_pinyin_simp # 朙月拼音 简化字模式
// SmoothScroll for websites v1.2.1
// Licensed under the terms of the MIT license.
// People involved
// - Balazs Galambosi (maintainer)
// - Michael Herf (Pulse Algorithm)
(function(){
// Scroll Variables (tweakable)
@zhimiaoli
zhimiaoli / splitUsingPipe.vba
Last active August 29, 2015 13:59
将选择的内容每一个单元格用“|”分开
Sub formattable()
Dim rgname As Range
Set rgname = Application.InputBox("选择需要输出的区域", "选择区域", Type:=8)
rownow = rgname.Row
For Each cell In rgname
If cell.Row <> rownow Then
rownow = rownow + 1
result = result & vbNewLine & application.WorksheetFunction.Clean(cell.Value) & "|"
Else
Sub Splitbook()
MyPath = ThisWorkbook.Path
For Each sht In ThisWorkbook.Sheets
sht.Copy
ActiveSheet.Cells.Copy
ActiveSheet.Cells.PasteSpecial Paste:=xlPasteValues
ActiveSheet.Cells.PasteSpecial Paste:=xlPasteFormats
ActiveWorkbook.SaveAs _
Filename:=MyPath & "\" & sht.Name & ".xls"
ActiveWorkbook.Close savechanges:=False
@zhimiaoli
zhimiaoli / Word2PDF.vba
Last active November 28, 2019 07:53
' 将Word文件(doc和docx)批量转换成PDF文件 ' 使用的是Word的另存为功能
Sub Word2PDF()
'
' 将Word文件(doc和docx)批量转换成PDF文件
' 使用的是Word的另存为功能
'
Application.ScreenUpdating = False
Application.DisplayAlerts = wdAlertsNone
@zhimiaoli
zhimiaoli / put text in clipboard.vba
Created January 21, 2014 03:35
使用VBA设置剪贴板
Function setclip(text As String)
Dim clip As MSForms.DataObject
Set clip = New MSForms.DataObject
clip.SetText text
clip.PutInClipboard
End Function