Skip to content

Instantly share code, notes, and snippets.

View hidao80's full-sized avatar

hidao hidao80

View GitHub Profile

あなたの役割

  • 質問をされたときは質問者の能力が10とした時、250の能力を持つ質問に対するコンプライアンスとファクトチェックに厳しい最高のシステムエンジニア兼プログラマーとして回答してください。

制約条件

  • プログラムに関する質問のときは、コードスニペットも出力してください。特別な指示がないときはJavaScriptで出力してください。
  • 入力にURLがあれば、そのリンク先のページおよびサイトの内容を参照してください。
  • 特別な指示がない場合以外、質問を復唱しないでください。
  • わからないときは「わかりません」と回答してください。
@hidao80
hidao80 / copilot-instructions.md
Created December 21, 2024 02:08
A General Instructions Markdown File for GitHub Copilot

Your Role

  • When asked a question, respond as the highest specialist with compliance and fact-checking rigor for questions with a capability of 250, assuming the questioner's capability is 10.

Constraints

  • When asked about programming, provide code snippets. If no specific instructions are given, output in JavaScript.
  • If you don't know, respond with "I don't know".
  • When answering with numbers, actively use a code interpreter to respond accurately.
  • If the input contains a URL, refer to the content of the linked page and site.
@hidao80
hidao80 / sendToMisskey.sh
Created December 19, 2024 22:23
A shell script to randomly post messages to Misskey.
#!/bin/bash
# Message list
MESSAGES=(
"Hello, world!"
"How's everyone doing today?"
"This is a random message."
"Hope you all are having a great day!"
"Remember to smile!"
"Coding is fun."
@hidao80
hidao80 / Deldoodle.html
Last active September 14, 2024 00:14
This is a page that allows you to easily perform searches.
<!DOCTYPE html>
<html>
<!--
Copyright (c) 2024 hidao80
Released under the MIT license
https://opensource.org/licenses/mit-license.php
-->
<!--
Twitter Emoji (Twemoji)
License
@hidao80
hidao80 / Disable only the fill handle.md
Last active September 5, 2024 06:47
Excelのセルの枠をダブルクリックしてもアクティブセルが移動しないマクロ

Excelの全てのブックに対してフィルハンドルを無効化しつつ、ドラッグアンドドロップを有効にする方法は、**個々のワークブックではなく、Excelの「個人用マクロブック」**にVBAコードを保存することで可能です。この方法では、すべてのブックでフィルハンドル無効化が適用され、さらに保存時に拡張子を .xlsx に保つこともできます。

手順

1. 個人用マクロブックにコードを追加

個人用マクロブックは、すべてのブックで利用可能なマクロを保存する特別なブックです。

  1. Excelで個人用マクロブックを開く
    • Excelを開き、Alt + F11キーを押してVBAエディタを開きます。
    • 「VBAプロジェクト」ウィンドウで、PERSONAL.XLSB(個人用マクロブック)が表示されているか確認します。表示されていない場合、Excelで新しいマクロを記録して保存するときに「マクロの記録」ダイアログでマクロの保存先に「個人用マクロ ブック」を選択し、OKボタンをクリックすると作成されます。
@hidao80
hidao80 / Misskey2024_5_0TimeToAbsolute.css
Last active June 30, 2024 20:49
Stylesheet to Add Absolute Time to the Posting Time Section for Misskey 2024.5.0
/**
Copyright (c) 2024 hidao80
Released under the MIT license
http://opensource.org/licenses/mit-license.php
*/
/* not post-column */
article {
time::before {content: attr(title) " ("}
time::after {content: ")"}
@hidao80
hidao80 / indolence.js
Last active May 29, 2024 22:04
indolence.js - A shoddy library for pure JavaScript that doesn't require NPM.
/**
* Copyright (c) 2023 hidao80
* Released under the MIT license
* https://opensource.org/licenses/mit-license.php
*/
/**
* Returns a new element with the given tag name.
* @param {string} tagName
* @returns {HTMLElement}
*/
@hidao80
hidao80 / ruleset_ja.xml
Last active October 8, 2023 03:23
phpmdの実行結果で表示されるメッセージを日本語化した ruleset.xml。
<?xml version="1.0"?>
<ruleset name="PHPMD ruleset that converts error messages into Japanese."
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
メッセージを日本語化しました。&#10;
エラーメッセージを日本語訳するには、ルールを読み込む必要があります。そのためプロジェクトに不要なルールはコメントアウトしてください。&#10;&#10;
ライセンス: This work is licensed under CC BY 4.0 &#10;&#10;
@hidao80
hidao80 / sendToChatworkForOutlook.vba
Last active September 13, 2023 21:20
Outlook VBA を使って着信メールの件名と本文のフォーマットから問い合わせメールと判断できれば、本文を添付ファイルとして Chatwork へ投稿する
' 定数値の定義
Const adTypeBinary = 1
Const adTypeText = 2
Const adLongVarBinary = 205
Const CHATWORK_TOKEN = "" ' Chatwork 通知用の API トークン。例)"123456789abcdef"
Const ROOM_NO = "" ' 通知を送信するチャンネルのルーム ID。例)"1234567890"
Const BOUNDARY = "011000010111000001101001" ' ファイルアップデート API のメッセージと添付ファイルのデータを分ける目印(HTTP 準拠)
Const CLOSE_BOUNDARY = vbCrLf & "--" & BOUNDARY & "--" & vbCrLf ' multipart/form-data の終端を表す文字列(HTTP 準拠)
' メール着信を Outlook が検出した場合に実行される Outlook 規定のサブプロシージャ。
@hidao80
hidao80 / AmazonUrlShortener.bookmarklet.js
Last active September 5, 2023 09:45
Amazon URL Shortener
/**
* @fileoverview
* This script copies the short URL of the Amazon product page to the clipboard.
* A short URL is a URL that contains only the product ID.
*
* Copyright (c) 2023 hidao80
* Released under the MIT license
* https://opensource.org/licenses/mit-license.php
*/
(async v => {