Skip to content

Instantly share code, notes, and snippets.

View boydaihungst's full-sized avatar
💻

boydaihungst boydaihungst

💻
View GitHub Profile
@boydaihungst
boydaihungst / 02.ass
Last active June 27, 2024 12:04
Gushing over magical girl viet sub Bluray
This file has been truncated, but you can view the full file.
[Script Info]
; Script generated by Aegisub 9786-makepkg-cb930ab6b
; http://www.aegisub.org/
ScaledBorderAndShadow: yes
ScriptType: v4.00+
PlayResX: 1920
PlayResY: 1080
Timer: 0.0000
YCbCr Matrix: TV.601
Video Aspect Ratio: c1.77708
@boydaihungst
boydaihungst / yt_downloader.user.js
Last active March 25, 2025 22:00
yt download script
// ==UserScript==
// @name Youtube Subtitle Downloader v36
// @description Download Subtitles
// @include https://*youtube.com/*
// @author Cheng Zheng
// @copyright 2009 Tim Smart; 2011 gw111zz; 2014~2023 Cheng Zheng;
// @license GNU GPL v3.0 or later. http://www.gnu.org/copyleft/gpl.html
// @require https://code.jquery.com/jquery-1.12.4.min.js
// @version 36
// @grant GM_xmlhttpRequest
@boydaihungst
boydaihungst / github_to_gitea_batch
Created March 17, 2024 13:01
github_to_gitea_batch
#!/bin/bash
GITHUB_USERNAME=
GITHUB_TOKEN=
GITHUB_ORGANISATION=
GITHUB_API_CALL=
GITHUB_MAX_PER_PAGE=100
GITHUB_CURRENT_PAGE=1
GITEA_TOKEN=
@boydaihungst
boydaihungst / rainbow-parens.scm
Last active March 3, 2023 07:33
nvim-rainbow-error
; interface a {}
(object_type
(("{" @opening)
("}" @closing))) @container
; not work
; const obj = { ...(true ? {} : {}) };
(parenthesized_expression
(("(" @opening)
(")" @closing))) @container
@boydaihungst
boydaihungst / what-forces-layout.md
Created February 20, 2023 18:43 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@boydaihungst
boydaihungst / proxy.pac
Created November 28, 2022 01:12
PAC green-tunnel
function FindProxyForURL(url, host) {
return "PROXY 127.0.0.1:8000";
}
@boydaihungst
boydaihungst / config.lua
Last active July 28, 2022 16:41
volar multiple lsp server - lunarvim
-- put file in here ~/.config/lvim/config.lua
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, {
"vuels",
"volar",
})
-- Install treesitter vue
--lvim.builtin.treesitter.ensure_installed = {
-- "vue",
public async foldersFilter(
userId: string,
payload: FileFolderInput,
nextCursor?: {
id: string;
sortedValue: any;
},
nextOptions: any = {},
) {
@boydaihungst
boydaihungst / aliases.config.js
Last active May 2, 2021 02:17
Use this file to generate alias.
const path = require('path');
const aliases = {
'@': '.',
'@src': './src',
'@router': './src/router',
'@views': './src/router/views',
'@layouts': './src/router/layouts',
'@components': './src/components',
'@assets': './src/assets',
router.beforeEach(async (to, from, next) => {
const localeInParams = getLocaleFromParams(to.params); //DIY
const isNewLocale =
localeInParams !== undefined && localeInParams !== currentLocale;
if (isNewLocale) {
const isNewLocaleSupported = SUPPORT_LOCALES.includes(localeInParams);
if (!isNewLocaleSupported) {
return next(redirectToFallbackLocale(currentLocale, to.fullPath));
}
await localeMessageChange(i18n, localeInParams);