Skip to content

Instantly share code, notes, and snippets.

View book000's full-sized avatar
👀
record User(String nickName, String screenName, Location country){}

Tomachi book000

👀
record User(String nickName, String screenName, Location country){}
View GitHub Profile
@book000
book000 / github-autoload-project-new-activity.user.js
Last active March 31, 2021 07:21
GitHub Autoload Project New Activity
// ==UserScript==
// @name GitHub Autoload Project New Activity
// @namespace https://tomacheese.com
// @version 0.1
// @description GitHub Autoload Project New Activity
// @author Tomachi
// @match https://github.com/*/projects/*
// @icon https://www.google.com/s2/favicons?domain=github.com
// @updateURL https://gist.github.com/book000/b58447b7a6b4626af59dbb97bead8ab9/raw/github-autoload-project-new-activity.user.js
// @grant none
@book000
book000 / ticktick-japanese-font.user.css
Created April 8, 2021 22:53
ticktick.com で中華フォントが使われてしまう問題を解決する
/* ==UserStyle==
@name Resolve an issue with Chinese fonts being used on ticktick.com
@namespace tomacheese.com
@version 1.0.0
@updateURL https://gist.github.com/book000/9913ba81d18ea9075c3bda70249a4178/raw/ticktick-japanese-font.user.css
@description ticktick.com で中華フォントが使われてしまう問題を解決する
@author Tomachi (book000)
==/UserStyle== */
@-moz-document domain("ticktick.com") {
* {
@book000
book000 / Package build.run.xml
Last active May 18, 2021 04:56
IntelliJでSpigotの開発環境を作る実行構成(すべてのファイルを .run ディレクトリに配置, buildAndTest.batをShiftJIS,CRLFにするのを忘れずに)
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Package build" type="MavenRunConfiguration" factoryName="Maven">
<MavenSettings>
<option name="myGeneralSettings" />
<option name="myRunnerSettings" />
<option name="myRunnerParameters">
<MavenRunnerParameters>
<option name="profiles">
<set />
</option>
/*
MIT License
Copyright (c) 2021 Tomachi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is

Pixivの公開ブックマークを全部プライベートに変更する

setInterval(() => {
    setTimeout(() => {document.querySelector(".sc-1dg0za1-0").click()}, 100)
    setTimeout(() => {document.querySelector(".sc-13ywrd6-6").click()}, 500)
    setTimeout(() => {document.querySelector("div.sc-1ij5ui8-0:nth-child(4) > div:nth-child(1) > div:nth-child(1)").click()}, 1000)
}, 2000)
@book000
book000 / ci.yml
Created June 25, 2021 14:23
個人用 Python 3.9 GitHub Actions CI
name: Python
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
NOW_PROCESS=`ps aux | grep $PPID | grep sshd | awk '{ print $11 }'`
if [ "$NOW_PROCESS" = sshd: ]; then
mkdir -p /var/log/scripts/`whoami`/
ttyName=`tty | sed -e 's/\/dev\///g'`
ipAddress=`w -i | grep $ttyName | awk '{ print $3; }'`
todayDate=`date '+%Y%m%d'`
script -afq /var/log/scripts/`whoami`/${ipAddress}_${todayDate}.log
exit
fi
@book000
book000 / check-app-running.php
Created October 18, 2021 17:32
Check if any of the specific applications are running in windows php
<?php
$check_working_applications = [
"vrmonitor.exe",
];
exec("tasklist /FO CSV 2>NUL", $task_list);
$task_list = array_map(function ($task) {
return str_getcsv($task, ",", '"');
}, $task_list);
foreach ($check_working_applications as $app) {
if (!in_array($app, array_column($task_list, 0))) {
@book000
book000 / youtube-dl.bat
Created October 25, 2021 21:28
youtube-dl -> yt-dlp in windows
@echo off
yt-dlp %*
@book000
book000 / remove-closed-pull-issue.js
Last active December 8, 2021 12:09
Remove Closed Pull/Issue in GitHub Notification
javascript:document.querySelectorAll("div.notifications-list ul li.notifications-list-item").forEach(s => { if ( s.querySelector("svg.octicon-git-merge") != null || s.querySelector("svg.octicon-git-pull-request-closed") != null || s.querySelector("svg.octicon-issue-closed") != null ) s.querySelector("input.js-notification-bulk-action-check-item").click();});document.querySelector("form button[title=\"Done\"]").click();