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
function generateToastHTML(message) { | |
return ` | |
<div class="_toast"> | |
<style scoped> | |
._toast | |
{ | |
position: fixed; | |
right: 2rem; | |
bottom: 0; | |
padding: 1rem; |
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
#!/bin/bash | |
WEBHOOK_URL=https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx | |
post_slack() { | |
echo "payload={\"text\": \"$(cat)\"}" | curl -s -S -X POST -d @- ${WEBHOOK_URL} | |
} | |
echo "<!here>\nhoge\nfuga" | post_slack |
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 <vector> | |
#include <M5StickC.h> | |
#include <BleKeyboard.h> | |
// ----------------------------------------------------------------------------- | |
// 定数 | |
// ----------------------------------------------------------------------------- | |
// 電源ボタンが1秒未満押された | |
const uint8_t AXP_WAS_PRESSED = 2; | |
// キーと待ち時間の構造体 |
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 <M5StickC.h> | |
#include "FS.h" | |
#include "SPIFFS.h" | |
#include "AudioFileSourcePROGMEM.h" | |
#include "AudioGeneratorMP3.h" | |
#include "AudioOutputI2S.h" | |
// オーディオファイル名 | |
const char AUDIO_FILE_NAME[] = "/hoge.mp3"; |
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 <M5StickC.h> | |
#include "FS.h" | |
#include "SPIFFS.h" | |
#include "AudioFileSourceSPIFFS.h" | |
#include "AudioGeneratorMP3.h" | |
#include "AudioOutputI2S.h" | |
// オーディオファイル名 | |
const char AUDIO_FILE_NAME[] = "/hoge.mp3"; |
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 <vector> | |
#include <M5StickC.h> | |
#include "FS.h" | |
#include "SPIFFS.h" | |
// WAVファイル名 | |
const char WAVE_FILE_NAME[] = "/hoge.wav"; | |
// スピーカー出力ピンの番号 | |
const uint8_t SPEAKER_PIN = GPIO_NUM_26; |
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 <M5StickC.h> | |
// スピーカー出力ピンの番号 | |
const uint8_t SPEAKER_PIN = GPIO_NUM_26; | |
// LOWでLED点灯、HIGHでLED消灯 | |
const uint8_t LED_ON = LOW; | |
const uint8_t LED_OFF = HIGH; | |
// PWM出力のチャンネル | |
const uint8_t PWM_CHANNEL = 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
#include <M5StickC.h> | |
// スピーカー出力ピンの番号 | |
const int SPEAKER_PIN = GPIO_NUM_26; | |
// LOWでLED点灯、HIGHでLED消灯 | |
const int LED_ON = LOW; | |
const int LED_OFF = HIGH; | |
const int freq = 50; | |
const int ledChannel = 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
@ECHO OFF | |
ECHO "500ミリ秒寝ます" | |
powershell -Command "sleep -m 500" | |
ECHO "起きました" | |
PAUSE |
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
{% if include.tag %} | |
{% assign filter = include.tag %} | |
{% else %} | |
{% if page.tags %} | |
{% assign filter = page.tags.first %} | |
{% endif %} | |
{% endif %} | |
{% if filter %} | |
<ul class="tag-list"> |
NewerOlder