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
<?php
// https://tomachi.jpn.ph/blog/discordmessagesend/
function DiscordMessageSend($channelid, $message, $embed = null){
$token = "TOKEN";
$data = array(
"content" => $message,
"embed" => $embed
);
$header = array(
#!/bin/bash
# 特定ディレクトリ以下にある全てのPHPファイルのシンタックスチェックをする。
# Check the syntax of all PHP files under a specific directory.
DIRPATH=/
# 1 week
find $DIRPATH -name \*.php -daystart -mtime -6 -exec php -l {} \; > /dev/null 2> phplint.log
# full
@book000
book000 / hamikuri_news_notify.php
Last active August 8, 2020 01:01
ハミダシクリエイティブの新着ニュースをWebhookを通じてDiscordに通知する。
<?php
function sendDiscordWebhook($message)
{
$url = "<DISCORD WEBHOOK URL>";
$data = [
"content" => $message
];
$header = array(
"Content-Type: application/json",
@book000
book000 / itpassportsiken.com.user.js
Created November 28, 2020 04:31
IT Passport Kakomon doujyo keyboard controller
// ==UserScript==
// @name IT Passport Kakomon doujyo keyboard controller
// @namespace https://gist.github.com/book000
// @version 0.0.1
// @description ITパスポート試験ドットコム「ITパスポート過去問道場」をキーボード操作可能とするスクリプト
// @author book000
// @match https://www.itpassportsiken.com/ipkakomon.php
// @grant none
// ==/UserScript==
/*
@book000
book000 / doragon_quest_tact_news_notify.php
Created December 11, 2020 09:25
ドラゴンクエストタクトの新着ニュースをWebhookを通じてDiscordに通知する。
<?php
function sendDiscordWebhook($message)
{
$url = "<DISCORD WEBHOOK URL>";
$data = [
"content" => $message
];
$header = array(
"Content-Type: application/json",
@book000
book000 / starlight-stage_news_notify.php
Created December 11, 2020 09:40
アイドルマスターシンデレラガールズ スターライトステージの新着ニュースをWebhookを通じてDiscordに通知する。
<?php
function sendDiscordWebhook($message)
{
$url = "<DISCORD WEBHOOK URL>";
$data = [
"content" => $message
];
$header = array(
"Content-Type: application/json",
@book000
book000 / README.md
Last active January 18, 2021 19:23
きららファンタジアニュースクローリング
@book000
book000 / using_ports.sh
Last active February 21, 2021 18:21
使用しているポート一覧を表示するワンライナーコード
sudo lsof -iTCP -sTCP:LISTEN -P | sed 's/NAME//g' | awk '{ print $9 }' | sed 's/localhost/*/g' | sed 's/*://g' | sort --numeric-sort | uniq
@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") {
* {