Skip to content

Instantly share code, notes, and snippets.

View Last-Order's full-sized avatar
🍉

Eridanus Sora Last-Order

🍉
  • Trip.com
  • Shanghai, China
View GitHub Profile
Object.defineProperty(window.navigator, "userAgent", {
get: () => {
return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15";
},
configurable: false,
});
@Last-Order
Last-Order / bypass_bilibili_upload_size_limit_v2.user.js
Created June 15, 2023 14:51
哔哩哔哩上传大小限制绕过
// ==UserScript==
// @name bilibili上传大小限制突破
// @namespace Violentmonkey Scripts
// @match https://member.bilibili.com/platform/upload/video/frame
// @grant none
// @version 1.0
// @author -
// @description 2021/8/30 下午2:31:56
// ==/UserScript==
Object._assign = Object.assign;
@Last-Order
Last-Order / add_cards.user.js
Created July 27, 2022 12:07
读取FLAC音频长度添加视频分段信息
// ==UserScript==
// @name 音频->分段
// @namespace Violentmonkey Scripts
// @match https://www.bilibili.com/video/*
// @grant none
// @version 1.0
// @author -
// @description 2022/7/27 11:52:53
// ==/UserScript==
@Last-Order
Last-Order / bypass_bilibili_upload_size_limit.user.js
Last active August 30, 2021 06:37
bypass_bilibili_upload_size_limit.user.js
// ==UserScript==
// @name bilibili上传大小限制突破
// @namespace Violentmonkey Scripts
// @match https://member.bilibili.com/video/upload.html
// @grant none
// @version 1.0
// @author -
// @description 2021/8/30 下午2:31:56
// ==/UserScript==
Object._assign = Object.assign;
@Last-Order
Last-Order / use_mediainfo_for_biu.user.js
Created February 26, 2020 03:07
Use Mediainfo.js for Biu
// ==UserScript==
// @name Use Mediainfo.js for Biu
// @namespace Violentmonkey Scripts
// @match https://web.biu.moe/Upload
// @grant none
// @version 1.0
// @author -
// @description 2020/2/25 下午9:57:36
// ==/UserScript==
(() => {
// ==UserScript==
// @name Abema 区域限制
// @version 1.0.0
// @run-at document-end
// @namespace Violentmonkey Scripts
// @match https://abema.tv/*
// @grant none
// ==/UserScript==
Object.defineProperty(__CLIENT_REGION__, 'isAllowed', {
get: () => true
@Last-Order
Last-Order / count.js
Created May 9, 2019 11:45
微博字数计算
getWeiboLength = (text) => {
const getLength = a => {
if (!a) return 0;
// eslint-disable-next-line no-control-regex
const b = a.match(/[^\x00-\xff]/g);
return a.length + (b ? b.length : 0);
};
const c = 41,
d = 140,
e = 20,
JTVCJTdCJTIyY2hhbm5lbE5hbWUlMjI6JTIyJUU2JTlDJTg5JUU2JUEwJTk2JUUzJTgzJTlFJUUzJTgzJThBT2ZmaWNpYWwlMjIsJTIycGFnZVVybCUyMjolMjJodHRwczovL2xpdmUuYmlsaWJpbGkuY29tLzM4MjIzODklMjIsJTIyc3RhdHVzJTIyOiUyMndhaXQlMjIlN0QsJTdCJTIyY2hhbm5lbE5hbWUlMjI6JTIyJUU1JUE0JThGJUU4JTg5JUIyJUU3JUE1JUFEJTIyLCUyMnBhZ2VVcmwlMjI6JTIyaHR0cHM6Ly9saXZlLmJpbGliaWxpLmNvbS8xMzk0NjM4MSUyMiwlMjJzdGF0dXMlMjI6JTIyd2FpdCUyMiU3RCwlN0IlMjJjaGFubmVsTmFtZSUyMjolMjIlRTUlQTQlQTclRTclQTUlOUUlRTYlQkUlQUElMjIsJTIycGFnZVVybCUyMjolMjJodHRwczovL2xpdmUuYmlsaWJpbGkuY29tLzIxMTMzOTc5JTIyLCUyMnN0YXR1cyUyMjolMjJ3YWl0JTIyJTdELCU3QiUyMmNoYW5uZWxOYW1lJTIyOiUyMiVFNiU5NyVCNiVFNCVCOSU4MyVFNyVBOSVCQSUyMiwlMjJwYWdlVXJsJTIyOiUyMmh0dHBzOi8vbGl2ZS5iaWxpYmlsaS5jb20vODg5OTUwMyUyMiwlMjJzdGF0dXMlMjI6JTIyd2FpdCUyMiU3RCwlN0IlMjJjaGFubmVsTmFtZSUyMjolMjIlRTUlQjglOTUlRTklODclOEMlMjIsJTIycGFnZVVybCUyMjolMjJodHRwczovL2xpdmUuYmlsaWJpbGkuY29tLzQ4OTUzMTIlMjIsJTIyc3RhdHVzJTIyOiUyMndhaXQlMjIlN0QsJTdCJTIyY2hhbm5lbE5hbWUlMjI6JTIyJUUzJTgzJUE2JUUzJTgzJUExJUUzJTgzJThFJUUzJTgyJUI3JUUzJTgyJUFBJUUzJTgz
// ==UserScript==
// @name Abema 强制 1080p
// @version 1.0.0
// @run-at document-start
// @namespace Violentmonkey Scripts
// @match https://abema.tv/*
// @grant none
// ==/UserScript==
const open = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function () {
@Last-Order
Last-Order / gist:9950953801a7bf61c9852e6f5e337393
Created October 18, 2018 13:56
失败的ass yutils音频特效
Comment: 0,0:00:26.86,0:00:28.86,lyric-jp,,0,0,0,code once,wav_reader = _G.Yutils.decode.create_wav_reader("C:/Users/Sora/Desktop/1.wav"); sample_rate = wav_reader.sample_rate(); byte_rate = wav_reader.byte_rate(); bit_depth = wav_reader.bits_per_sample();
Comment: 0,0:00:28.86,0:00:28.86,lyric-jp,,0,0,0,code syl,e = 2.71828; position = wav_reader.position(wav_reader.sample_from_ms(math.round(line.start_time + syl.start_time))); samples = wav_reader.samples_interlaced(wav_reader.sample_from_ms(syl.duration > 0 and syl.duration or 1)); for i=1, samples.n do samples[i] = samples[i] / math.abs(wav_reader.min_max_amplitude()) end freq_analyzer = _G.Yutils.decode.create_frequency_analyzer(samples, sample_rate); freqs = freq_analyzer.frequencies() ; freqs_new = {}; count = 1; weight_max = 0; for i=1, freqs.n do if freqs[i].freq >120 and freqs[i].freq < 600 and math.round(freqs[i].freq) % 5 == 0 then _G.aegisub.log(freqs[i].freq .. ", " .. freqs[i].weight .. "\n") freqs_new[count] = freqs[i]; count = count+1; if