Skip to content

Instantly share code, notes, and snippets.

View mohemohe's full-sized avatar
🍣
さーもん

mohemohe mohemohe

🍣
さーもん
View GitHub Profile
@mohemohe
mohemohe / github-backlog-linkify.user.js
Created April 22, 2024 06:40
GitHubのPullReqのタイトルにあるBacklogの課題キーをいい感じにリンクにするやつ
// ==UserScript==
// @name github.com Backlog linkify
// @namespace Violentmonkey Scripts
// @match https://github.com/*
// @grant none
// @version 1.0
// @author -
// @description 2024/4/22 14:40:04
// @require https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js
// ==/UserScript==
@mohemohe
mohemohe / fxtwitter.user.js
Created January 10, 2024 06:28
FxTwitterの共有リンクをクリップボードにコピー
// ==UserScript==
// @name FxTwitter
// @namespace Violentmonkey Scripts
// @match https://twitter.com/*/status/*
// @grant none
// @version 1.0
// @author -
// @description 2024/1/10 14:48:46
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1
// @require https://cdn.jsdelivr.net/combine/npm/@violentmonkey/dom@2,npm/@violentmonkey/ui@0.7
@mohemohe
mohemohe / カスタムスクリプト.js
Created October 21, 2023 19:07
Enhancer for YouTube 日本語字幕
(async () => {
const waitAsync = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
document.querySelector(".ytp-settings-button").click();
await waitAsync(500);
let items = document.querySelectorAll(".ytp-settings-menu .ytp-menuitem-label");
let ok = false;
for (const item of Array.from(items)) {
@mohemohe
mohemohe / _.md
Created July 24, 2023 10:48
XのロゴをTwitterに戻すCSS

@mohemohe
mohemohe / watch-karabiner.1s.sh
Created January 25, 2023 06:15
watch-karabiner.1s.sh
#!/bin/bash
current="$(lsappinfo info -only name "$(lsappinfo front)" | cut -d'=' -f2)"
case "$current" in
'"Parsec"' | '"Parallels Desktop"' ) profile="PC" ;;
* ) profile="Default" ;;
esac
if [[ ! -e /tmp/watch-karabiner ]]; then
touch /tmp/watch-karabiner
@mohemohe
mohemohe / install_docker-compose.sh
Last active October 30, 2022 06:22
install/update docker compose v2
#!/bin/bash -x
if [[ "${COMPOSE_VERSION}" == "" ]]; then
echo "must be set env 'COMPOSE_VERSION'"
exit 1
fi
OS="$(uname -s | awk '{print tolower($0)}')"
ARCH="$(uname -m)"
@mohemohe
mohemohe / say.sh
Last active February 21, 2022 06:25
voiceroid_daemon say
#!/bin/bash
BASE_URL=http://172.16.34.56:8080
#=====================================
function _exit() {
exit 1
}
@mohemohe
mohemohe / youtube-subtitle.js
Last active August 6, 2021 15:09
youtube-subtitle.js
(async () => {
const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
const subtitleButton = document.querySelector('.ytp-subtitles-button');
if (!subtitleButton) {
return;
}
const subtitleButtonState = subtitleButton.getAttribute('aria-pressed') === 'true';
subtitleButton.click();
if (subtitleButtonState) {
@mohemohe
mohemohe / LICENSE
Created June 2, 2021 03:10
guregu/dynamo migrate script
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2020 mohemohe <mohemohe@ghippos.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@mohemohe
mohemohe / softether.service
Last active March 12, 2021 08:00
netctlで固定IPにしてsoftetherしようとしたらVPNインターフェースの生成より先にnetctlが上がってきてクッソ困ったでござるの巻 ExecUpPreがないからhookできないでござるよ ニンニン
[Unit]
Description=exec softether
BindsTo=sys-subsystem-net-devices-enp2s0.device
After=sys-subsystem-net-devices-enp2s0.device
[Service]
Type=simple
ExecStart=/sh/softether.sh
[Install]