Skip to content

Instantly share code, notes, and snippets.

View miyaoka's full-sized avatar

Masaya Kazama miyaoka

View GitHub Profile
@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 / 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 / ドゥンドゥン
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);
obs = obslua
source_name = ""
total_seconds = 0
cur_seconds = 0
last_text = ""
stop_text = ""
activated = false
next_scene = ""
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;";
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)
@miyaoka
miyaoka / gist:c302f80a7ccfa7a0b0a7f9ca134e2e14
Last active June 29, 2021 13:15
TL上のTwitter画像をフル表示するstyle
a[role="link"]:not([rel]):not([aria-label]):only-of-type > [style] * {
position: relative !important;
padding-bottom: 0 !important;
margin: 0 !important;
}
a[role="link"]:not([rel]):not([aria-label]):only-of-type > [style] img {
opacity: 1 !important;
}
@miyaoka
miyaoka / gist:0b761dfede84e54abb20d460b5737e38
Last active June 1, 2020 09:37
校長先生の話エンドレス
校長先生の話エンドレス
経過時間
01 : 06 : 37
校長先生音量:
おはようございます。今日は皆さんが、首を長くして待っていた全校遠足の日です。天気も、昨日までと違って、きれいな青空が広がっています。きっと、皆さんの、楽しみにしている気持ちが空に通じたのだと思います。
例えば、お餅に角があったら、みんな記念日に数えていくとよいでしょう。
ああ、怒っていただきました。今日はアメリカの話です。だから。
給食の歴史を経て、鬼のスーパー大松。ということですね。
先生方も、皆さんは、この地球上には道はないのです。文章はこの中学校生活の中で、自分探しの旅、中学校時代につくるのではないのです。今でこそ当たり前になっているものです。
@miyaoka
miyaoka / timer
Last active April 24, 2019 11:11
let sec = 60 * 20
const alertSec = 60
let timer
let alertTimer
const d = document.createElement('div')
const pad = (s) => `00${s}`.slice(-2)
const update = () => {
d.innerText = `${pad(Math.floor(sec / 60))}:${pad(sec % 60)}`
}
const stop = () => {
@miyaoka
miyaoka / timer.js
Last active May 15, 2018 00:03
presentation timer
let sec = 60 * 8
const alertSec = 60
let timer
let alertTimer
const d = document.createElement('div')
const pad = (s) => `00${s}`.slice(-2)
const update = () => {
d.innerText = `${pad(Math.floor(sec / 60))} : ${pad(sec % 60)}`
}
const stop = () => {