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
function setTrigger() { | |
// 使用済トリガー削除 | |
delTrigger() | |
// 9:45 | |
var triggerDate = new Date(); | |
const week =triggerDate.getDay(); | |
if (week == 0 || week == 6) { | |
// holiday no working | |
return; |
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
function getLastRowWithValue() { | |
const sheet = SpreadsheetApp.getActiveSheet(); | |
const names = sheet.getRange('A:A').getValues().filter(String); | |
shuffle(names); | |
const message = names.join('\n') | |
slack(message) | |
} | |
function shuffle(array) { |
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
# coding: utf-8 | |
class KaraokeMachine | |
SCALE = %w(C C# D D# E F F# G G# A A# B) | |
def initialize(melody) | |
@scales = melody.gsub(/([A-Z]#*|\|| )/, '\1s').split("s") | |
end | |
def transpose(amount) |