This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ATOM Lite/MatrixをBLEキーボードにするサンプルプログラム | |
* | |
* 送信するキーを変更するにはSEND_KEYの値を変更してください。 | |
* | |
* コンパイルにはESP32 BLE Keyboard library(https://github.com/T-vK/ESP32-BLE-Keyboard)が必要です。 | |
* 事前にインストールしておいてください。 | |
*/ | |
#include <BleKeyboard.h> // https://github.com/T-vK/ESP32-BLE-Keyboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ATOM LiteをBLEキーボードにして,定期的にキーを送ることで | |
* スクリーンセーバーを起動しないようにする。 | |
* | |
* KILL_INTERVAL_SEC: 定期的にキーを送る頻度(秒) | |
* KILL_KEY: 定期的に送るキー | |
* | |
* ATOM Liteのボタンを押すことで,SEND_KEYに設定されたキーを | |
* 送る。 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <M5Core2.h> | |
#include <WiFi.h> | |
const char* SSID = "SSID"; | |
const char* PASSWORD = "SSID Password"; | |
const char* NTP_SERVER = "ntp.jst.mfeed.ad.jp"; | |
const char* TZ = "JST-9"; | |
const uint8_t FONT_NUMBER = 2; // 16px ASCII Font | |
const uint8_t FONT_SIZE = 16; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ATOM Lite/MatrixをBLEキーボードにして,特定の文字列を送付する。 | |
* | |
* 例えば,決まったWi-FiのSSIDに対するパスワードを送るといった用途に使えます。 | |
* | |
*/ | |
#include <BleKeyboard.h> // https://github.com/T-vK/ESP32-BLE-Keyboard | |
#include <M5Atom.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Amazon Lover | |
// @namespace https://github.com/3110 | |
// @version 0.5 | |
// @include https://www.amazon.co.jp/* | |
// @run-at document-start | |
// @description Remove all parameters in URL and add the parameter m=AN1VRQENFRJN5 to URL | |
// @author SAITO, Tetsuya <[email protected]> | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <M5AtomS3.h> | |
const size_t ETH_ALEN = 6; | |
const uint16_t SPACING = 4; | |
const uint8_t FONT = 1; | |
const uint8_t FONT_HEIGHT = 8; | |
const uint8_t QR_VERSION = 1; | |
uint8_t macAddr[ETH_ALEN] = {0}; | |
char macStr[ETH_ALEN * 3 + 1] = {0}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; AutoHotKey 2.0で「]YYYYMMDD」と入力し,領域選択してCtrl+Cでクリップボードにコピーすると,YYYY年MM月DD日(曜日)に変換して置き換える | |
#Requires AutoHotkey v2.0 | |
OnClipboardChange DateTranslatorCB | |
DateTranslatorCB(dataType) | |
{ | |
if (dataType = 1 && RegExMatch(A_Clipboard, "^\](\d{4})(\d{2})(\d{2})$", &match)) | |
{ | |
DateStr := FormatTime(match[1] match[2] match[3], "yyyy年MM月dd日(ddd)") | |
A_Clipboard := DateStr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qrcode | |
import argparse | |
VALID_ENCRYPTIONS = ["WEP", "WPA", "WPA2"] | |
DEFAULT_SIZE = 300 | |
def generate_wifi_qrcode(ssid, password, filename, encryption="WPA2", size=DEFAULT_SIZE): | |
# 暗号化方式の検証 | |
if encryption not in VALID_ENCRYPTIONS: | |
raise ValueError(f"無効な暗号化方式です: {encryption}。有効な値は {', '.join(VALID_ENCRYPTIONS)} です。") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Amazon URL Shortener | |
// @namespace http://tampermonkey.net/ | |
// @version 0.4 | |
// @description Shorten Amazon URLs to minimal form | |
// @match https://www.amazon.co.jp/* | |
// @grant none | |
// ==/UserScript== | |
(() => { | |
const shorten = () => { |