Skip to content

Instantly share code, notes, and snippets.

View hidao80's full-sized avatar

hidao hidao80

View GitHub Profile
@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 => {
@hidao80
hidao80 / pip-jammer-canceller-bookmarklet.js
Last active September 5, 2023 10:19
Bookmarklet to remove the disablepictureinpicture attribute from all video tags in a page.
javascript:(()%3D%3E%7B%5B...document.querySelectorAll(%22video%22)%5D.map((e%3D%3Ee.removeAttribute(%22disablepictureinpicture%22)))%3B%7D)()
@hidao80
hidao80 / CompressPhoneNumbers.js
Created August 9, 2023 23:04
Simple phone number compression/decompression functions.
/**
* Compress strings that require only numbers, such as phone numbers.
*
* @param {string} num Requiring only numbers.
* @param {string} code String of symbols used for compression.
* @return {string} Compressed string
*/
function numCps(
num,
code = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@hidao80
hidao80 / Chocolatey
Last active August 6, 2023 23:44
Chocolatey packages install command
cinst -y googlechrome git 7zip visualstudiocode vlc libreoffice winscp brave `
composer gimp InkScape pandoc dbeaver pdfxchangeeditor microsoft-windows-terminal `
ultravnc virtualbox vagrant veracrypt winmerge xmind zoom Screenpresso `
advanced-ip-scanner win32diskimager scansnapmanager jre8 wsl2 wget `
googlejapaneseinput bonjour eartrumpet cpu-z ffmpeg crystaldiskmark `
vcredist-all microsoft-build-tools microsoft-windows-terminal python python3 `
nodejs mkcert obs openssl php insomnia-rest-api-client powerautomatedesktop curl `
barrier doxygen.install graphviz ferdium