This file contains 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
/* | |
* M5Stick C PlusでSAMPLING_FREQUENCYでマイクを測定し、FFTして周波数成分をLCDにグラフ表示。 | |
* https://ambidata.io/samples/m5stack/sound/ | |
*/ | |
#include <M5StickCPlus.h> | |
#include "arduinoFFT.h" | |
#define MIC 33 | |
#define SAMPLING_FREQUENCY 40000 |
This file contains 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
/* | |
* M5StackでSAMPLING_FREQUENCYでマイクを測定し、FFTして周波数成分をLCDにグラフ表示。 | |
* https://ambidata.io/samples/m5stack/sound/ | |
*/ | |
#include <M5Core2.h> | |
#include "arduinoFFT.h" | |
#define MIC 33 | |
#define SAMPLING_FREQUENCY 40000 |
This file contains 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
{ | |
"title": "Unicode Hex Input Switcher", | |
"rules": [ | |
{ | |
"description": "Switchi Input Source between Unicode Hex Input ane Japanese", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "h", |
This file contains 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
def rmkdir(d) | |
begin | |
Dir::mkdir(d) | |
rescue | |
rmkdir(d.gsub(/\/[^\/]+?$/, '')) | |
Dir::mkdir(d) | |
end | |
end | |
Dir::glob("/Users/hoge/Music/FLAC/**/*.flac").each {|inf| |
This file contains 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
# JSPORTSサイクルロードレースの放送予定をicalで出力する | |
require 'nokogiri' | |
require 'open-uri' | |
require 'icalendar' | |
require 'digest' | |
def parseDate(str) | |
r = [] | |
d = str.scan(/(\d+)月(\d+)日/).flatten |
This file contains 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
FROM ruby:3.0.1-slim AS build | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | |
cmake \ | |
gcc-arm-none-eabi \ | |
libnewlib-arm-none-eabi \ | |
libstdc++-arm-none-eabi-newlib \ | |
ca-certificates \ | |
git \ | |
gcc \ |
This file contains 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
class KyuriKai | |
def pressed(keycode) | |
# true: continue the following steps, false: skip the following steps and jump to the next loop | |
true or false | |
end | |
def released(keycode) | |
true or false | |
end | |
end |
This file contains 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
# Initialize a Keyboard | |
kbd = Keyboard.new | |
# Initialize GPIO assign | |
kbd.init_pins( | |
[ 7, 8, 9, 10 ], | |
[ 15, 14, 13, 12, 11, 20, 19, 18, 17, 16] | |
) | |
# +---------+---------+---------+---------+---------+---------+---------+---------+---------+--------- |