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
| const getCompanyNames = () => { | |
| const book = SpreadsheetApp.getActiveSpreadsheet(); | |
| // スプレットシートの名前を「営業リスト」にする必要あり | |
| const sheet = book.getSheetByName("営業リスト"); | |
| const data = sheet.getDataRange().getValues(); | |
| // 1行目はヘッダーなのでスキップし、会社名のみ抽出 | |
| return data.slice(1).map(row => row[0]).filter(name => name); // 空白行を除外 | |
| }; |
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
| hash = {a: 'a', b: 'b'} | |
| # Hashクラスには[]メソッドがある。 | |
| # 普通、hash[:a]のように使う。 | |
| # []メソッドなので、下のように書ける。 | |
| hash.[] 'a' | |
| # => 'a' | |
| hash.[]('a') |
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
| git br -r --merged master | grep -v -e master -e develop -e main | sed 'sX *origin/XX' | xargs -I % git push --delete origin % | |
| # masterブランチにマージ済みのリモートブランチ | |
| git branch -r --merged master | |
| -r: リモートブランチ | |
| --merged <ブランチ名>: マージ済みのブランチの一覧(<ブランチ名>も含まれる) | |
| # master / develop / main に一致しないものを抽出 | |
| grep -v -e master -e develop -e main |