Skip to content

Instantly share code, notes, and snippets.

View tkdn's full-sized avatar
🏠
Working From Home.

Satoshi Takeda tkdn

🏠
Working From Home.
View GitHub Profile
@tkdn
tkdn / index.mjs
Created February 24, 2023 03:02
PDF からリンク抽出(失敗)
import { PDFExtract } from "pdf.js-extract";
const pdfExtract = new PDFExtract();
/** @type {PDFExtractOptions} */
const options = {
firstPage: 3,
lastPage: 3,
};
pdfExtract
@tkdn
tkdn / inject-noindex-metatag.mjs
Created February 21, 2023 09:09
tag差し込み
import { readFileSync, writeFileSync } from 'node:fs';
const filePath = './dist/index.html';
const org = readFileSync(filePath, { encoding: 'utf-8' });
const injectTag = '<meta foo="baz" />';
const buff = org.replace(/(\<\/head\>)/, `${injectTag}$1`);
writeFileSync(filePath, buff);
@tkdn
tkdn / rails-doc-transfer-to-ja.user.js
Last active February 10, 2023 06:42
出、出〜鉄道文書和訳輪付奴〜
// ==UserScript==
// @name 出、出〜鉄道文書和訳輪付奴〜
// @namespace https://gist.github.com/tkdn/26f5beb115a29f05460d7406bd8fc158#file-rails-doc-transfer-to-ja-user-js
// @updateURL https://gist.github.com/tkdn/26f5beb115a29f05460d7406bd8fc158/raw/0ca538e290d376f758dfb8ac4edae34bdfd059d7/rails-doc-transfer-to-ja.user.js
// @downloadURL https://gist.github.com/tkdn/26f5beb115a29f05460d7406bd8fc158/raw/0ca538e290d376f758dfb8ac4edae34bdfd059d7/rails-doc-transfer-to-ja.user.js
// @version 0.1
// @description Rails Doc 英語版から日本語に移動するリンクを追加
// @author tkdn <tkdnation@gmail.com>
// @grant none
// ==/UserScript==
@tkdn
tkdn / udemy-keep-playbackrate.user.js
Last active October 22, 2022 10:48
Udemy の動画の再生速度をチャプター移動ごとに変えない
// ==UserScript==
// @name 出、出~腕見動画速度維持奴〜
// @namespace https://gist.github.com/tkdn/5b55161f21a242057fdaf8c436d24012#file-udemy-keep-playbackrate-user-js
// @updateURL https://gist.github.com/tkdn/5b55161f21a242057fdaf8c436d24012/raw/359b25e92bd25d31286fbd1ad6cba9f85a3ae9d1/udemy-keep-playbackrate.user.js
// @downloadURL https://gist.github.com/tkdn/5b55161f21a242057fdaf8c436d24012/raw/359b25e92bd25d31286fbd1ad6cba9f85a3ae9d1/udemy-keep-playbackrate.user.js
// @version 0.2
// @description Udemy で動画の再生速度をチャプター移動ごとに変えない
// @author tkdn <tkdnation@gmail.com>
// @match https://*.udemy.com/*/*
// @grant none
@tkdn
tkdn / react-doc-transfer-to-ja.user.js
Last active October 22, 2022 00:26
React Doc 英語版から日本語に移動するリンクを追加
// ==UserScript==
// @name 出、出~反応取説日本語版転送奴〜
// @namespace https://gist.github.com/tkdn/fbbbc943da0e18a89a2cda3784e6d2f7#file-react-doc-transfer-to-ja-user-js
// @updateURL https://gist.github.com/tkdn/fbbbc943da0e18a89a2cda3784e6d2f7/raw/6ee1f979f4f8dee68f2d367c5301934fb3abf2bc/react-doc-transfer-to-ja.user.js
// @downloadURL https://gist.github.com/tkdn/fbbbc943da0e18a89a2cda3784e6d2f7/raw/6ee1f979f4f8dee68f2d367c5301934fb3abf2bc/react-doc-transfer-to-ja.user.js
// @version 0.1
// @description React Doc 英語版から日本語に移動するリンクを追加
// @author tkdn <tkdnation@gmail.com>
// @match https://reactjs.org/*/*
// @grant none
@tkdn
tkdn / meet-picture-in-picture.user.js
Last active March 4, 2022 07:47
Meet で PiP したい
// ==UserScript==
// @name 出、出~出会画像内画像奴〜
// @namespace https://gist.github.com/tkdn/e6ed758df441b106eddc9ba8a10aa531#file-meet-picture-in-picture-user-js
// @updateURL https://gist.github.com/tkdn/e6ed758df441b106eddc9ba8a10aa531/raw/b6e921d5665a1165e4a02478272b7a0424b50791/meet-picture-in-picture.user.js
// @downloadURL https://gist.github.com/tkdn/e6ed758df441b106eddc9ba8a10aa531/raw/b6e921d5665a1165e4a02478272b7a0424b50791/meet-picture-in-picture.user.js
// @version 0.2
// @description Meet の画面共有を PiP する
// @author tkdn <tkdnation@gmail.com>
// @match https://meet.google.com/*
// @grant none
@tkdn
tkdn / github-copy-short-sha.user.js
Last active December 28, 2021 04:52
SHA 短いのがクリップボードにほしい
// ==UserScript==
// @name 出、出~短管理識別子取奴〜
// @namespace https://gist.github.com/tkdn/f8fcf637fc2bc60e01f64ee7025186c3#file-github-copy-short-sha.user.js
// @updateURL https://gist.githubusercontent.com/tkdn/f8fcf637fc2bc60e01f64ee7025186c3/raw/58daa1a22a7845d838efc1786c30c96acc7ce050/github-copy-short-sha.user.js
// @downloadURL https://gist.githubusercontent.com/tkdn/f8fcf637fc2bc60e01f64ee7025186c3/raw/58daa1a22a7845d838efc1786c30c96acc7ce050/github-copy-short-sha.user.js
// @version 0.1
// @description GitHub の SHA コピーを短いやつにする
// @author tkdn <tkdnation@gmail.com>
// @match https://github.com/*/*
// @grant none
@tkdn
tkdn / forcedresizestyle.user.js
Last active February 16, 2021 00:43
textarea をリサイズさせないのはおかしいだろ
// ==UserScript==
// @name textarea をリサイズさせないのはおかしい
// @namespace https://gist.github.com/tkdn/cad64d2e51daae9b5fdacbd62bfc8776#file-forcedresizestyle-user-js
// @updateURL https://gist.github.com/tkdn/cad64d2e51daae9b5fdacbd62bfc8776/raw/dd70110598c61e0cb27b39184091e5be8d05d8d2/forcedresizestyle.user.js
// @downloadURL https://gist.github.com/tkdn/cad64d2e51daae9b5fdacbd62bfc8776/raw/dd70110598c61e0cb27b39184091e5be8d05d8d2/forcedresizestyle.user.js
// @version 0.1
// @description
// @author tkdn
// @match https://*/*
// @grant none
@tkdn
tkdn / jirasupport.user.js
Last active January 18, 2021 02:58
UserScript
// ==UserScript==
// @name JIRA 次世代プロジェクトサポート
// @namespace https://gist.github.com/tkdn/cabe343e5fa23904e3d5346b975e5675#file-jirasupport-userscript-js
// @updateURL https://gist.githubusercontent.com/tkdn/cabe343e5fa23904e3d5346b975e5675/raw/ee98ebba57c2728ce23373de75e64e3aa81219fa/jirasupport.userscript.js
// @downloadURL https://gist.githubusercontent.com/tkdn/cabe343e5fa23904e3d5346b975e5675/raw/ee98ebba57c2728ce23373de75e64e3aa81219fa/jirasupport.userscript.js
// @version 0.1
// @description JIRA 次世代プロジェクトの UI サポートをします
// @author tkdn
// @match https://*.atlassian.net/jira/software/projects/*
// @grant none