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 / depcheck-and-remove.sh
Created April 12, 2022 16:35
depcheckして、そのままRemoveする
npx depcheck --json | jq -r .dependencies[] | xargs yarn remove
npx depcheck --json | jq -r .devDependencies[] | xargs yarn remove
@book000
book000 / minecraft-plugin-manually-updater.php
Created March 11, 2022 19:26
手動でMinecraft(Spigot)プラグインをアップデートするのを助けるスクリプト
<?php
/*
plugins-oldディレクトリに古いプラグインjarをすべて入れて、実行するとplugin.ymlの内容をもとに関連サイトを開いたり、ダウンロード処理を行ったりする
*/
function getFiles($dir)
{
$files = scandir($dir);
$files = array_diff($files, array('.', '..'));
$files = array_filter($files, function ($file) use ($dir) {
@book000
book000 / create-kana-emojis.php
Last active February 27, 2022 11:26
あ~んをフォントを指定して絵文字画像を作成するPHPスクリプト (GD使用)
<?php
/*
あ~んをフォントを指定して絵文字画像を作成するPHPスクリプト (GD使用)
- Created by Tomachi https://gist.github.com/book000/16ff21e6916ae94033dfeba27a20eb90
PREFIX_images ディレクトリに50枚の画像が生成されます。
PREFIX_emojis.txt には絵文字の一覧を示すメッセージ用テキストが生成され出力されます。
stdout には50音表に並んだ絵文字表が出力されます。
*/
@book000
book000 / reggae-one.user.js
Created February 27, 2022 10:38
Reggae One💢
// ==UserScript==
// @name Reggae One💢
// @namespace https://tomacheese.com
// @version 1.0.0
// @description The world is made up of ANGER.
// @author Tomachi
// @match http://*/*
// @match https://*/*
// @updateURL https://gist.github.com/book000/e84ca5eb8715686d3d077311d3363411/raw/reggae-one.user.js
// @icon https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/285/anger-symbol_1f4a2.png
#!/bin/bash
send_message() {
token=""
channelId=""
curl \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bot $token" \
-d "{\"content\": \"$1\"}" \
"https://discord.com/api/channels/$channelId/messages"
@book000
book000 / auto-download-gartic-phone-gif.js
Created January 5, 2022 13:31
Gartic Phoneダウンロード自動化?Chrome推奨
isFound = false;
setInterval(() => {
console.log("checking", isFound)
if(document.querySelector("i.download") !== null) {
console.log("found & click")
if(!isFound) document.querySelector("i.download").click();
isFound = true;
}else{
isFound = false
}
@book000
book000 / mirakurun-vlc.php
Created January 1, 2022 11:17
Mirakurunを使いVLCでテレビを見れるようにプレイリストを作成するPHPスクリプト
<?php
$json = json_decode(file_get_contents("http://192.168.0.201:40772/api/channels?type=GR"), true);
print_r($json);
$list = [
"#EXTM3U",
"#EXTVLCOPT:network-caching=1000",
""
];
foreach ($json as $object) {
@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();
@book000
book000 / youtube-dl.bat
Created October 25, 2021 21:28
youtube-dl -> yt-dlp in windows
@echo off
yt-dlp %*
@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))) {