Skip to content

Instantly share code, notes, and snippets.

View miyaoka's full-sized avatar

Masaya Kazama miyaoka

View GitHub Profile
const getFilePathList = (dir: string): string[] => {
return fs.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
const path = `${dir}/${entry.name}`
return entry.isDirectory() ? getFilePathList(path) : path
})
}
const files = getFilePathList(targetPath)
javascript: (function () {
const container = document.querySelector("body");
const img = container.querySelector("img");
img.style.position = 'absolute';
const l = img.cloneNode();
l.style =
"position: absolute;z-index: 1;left: 0px;bottom: 0px;width: auto;height: auto;transform: scale(0.5) translate(0,50%)";
const r = img.cloneNode();
r.style =
"position: absolute;z-index: 1;bottom: 0px;transform: scale(.5) translate(-561px,50%);mix-blend-mode: difference;width: auto;height: auto;";
obs = obslua
source_name = ""
total_seconds = 0
cur_seconds = 0
last_text = ""
stop_text = ""
activated = false
next_scene = ""
@miyaoka
miyaoka / ドゥンドゥン
Last active March 8, 2023 05:24
consoleに貼り付けて実行
// bgm
var p=document.createElement("div");p.id="player",document.body.appendChild(p);var s=document.createElement("script");function onYouTubeIframeAPIReady(){new YT.Player("player",{height:"0",width:"0",videoId:"OiGhqVxfWIc",events:{onReady:e=>e.target.playVideo()}})}s.src="https://www.youtube.com/iframe_api",document.body.appendChild(s);
// https://twitter.com/uhyo_/status/1633310922054807553
document.head.insertAdjacentHTML("beforeend", "<style>::view-transition-old(root),::view-transition-new(root) {animation: none; mix-blend-mode: normal}</style>");
setInterval(()=>document.startViewTransition(()=>{}).ready.then(() => {
document.documentElement.animate({ scale: [1, 1.2], opacity: [1, 0]}, {duration: 100, pseudoElement: "::view-transition-new(root)"})
}), 500);
@miyaoka
miyaoka / stylus.css
Last active June 19, 2023 13:18
stylus
/* googleads */
:is(
[tbl-data-mutation-observer],
iframe[data-google-container-id],
iframe[srcdoc],
iframe[src^="https://googleads.g.doubleclick.net"],
iframe[src^="https://s.yimg.jp"],
iframe[src^="https://static.affiliate.rakuten.co.jp"]
):not(:hover) {
opacity: 0.05 !important;
@miyaoka
miyaoka / custom.css
Last active April 27, 2024 14:28
vscode logo
.editor-group-watermark > .letterpress {
background-image: url("https://raw.githubusercontent.com/SAWARATSUKI/ServiceLogos/main/VisualStudioCode/VisualStudioCode.png") !important;
}
@miyaoka
miyaoka / gist:ca3bb9cd91e71a7b895d01cda09c08ed
Created May 24, 2024 06:06
youtubeレイアウト修正
ytd-watch-grid[default-layout] {
#below {
top: 500px;
}
}
ytd-watch-grid[full-bleed-player] {
#columns {
flex-direction: row-reverse;
}
#primary {