Skip to content

Instantly share code, notes, and snippets.

View AWtnb's full-sized avatar
i love coffee

Akira Watanabe AWtnb

i love coffee
View GitHub Profile
@AWtnb
AWtnb / bookLogger.js
Last active June 2, 2019 14:10
reading log from slack
/*
読書記録用
*/
// ISBN 12桁の末尾にからチェックディジットを追加する関数
function appendCheckDigit (isbn12) {
var array = String(isbn12).split("")
var total = 0;
// 奇数桁
for (var i = 0; i <= 10; i += 2) {
@AWtnb
AWtnb / userChrome.css
Last active October 21, 2022 08:40
thunderbird css
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
* {
font-family: "UDEV Gothic" !important;
}
/* ------------------------------
folder pane
------------------------------ */
@AWtnb
AWtnb / voteOnSlack.js
Last active December 25, 2019 06:42
easy vote on slack
/*
slash command
多数決を簡単に行う
*/
/////////////////////////////////////////////////////////////////////////
// グローバル変数
/////////////////////////////////////////////////////////////////////////
//token
@AWtnb
AWtnb / newEmojiNotifier.js
Last active July 13, 2019 14:08
notify new emoji
/*
ワークスペースに追加されたチャンネルをシートに追加して定時で slack に通知
*/
///////////////////////////////////////////////////////
// グローバル変数
///////////////////////////////////////////////////////
@AWtnb
AWtnb / emoji2stamp.js
Last active March 28, 2019 03:29
send emoji url with slash command
/*
slash command
投稿された絵文字のURLを返すことでスタンプのように投稿する
*/
/////////////////////////////////////////////////////////////////////////
// グローバル変数
/////////////////////////////////////////////////////////////////////////
// token
@AWtnb
AWtnb / dummyRobot.js
Last active March 27, 2019 03:31
dummy robot on slack
/*
slash command
言いたいことをロボットに代弁してもらう
scope
chat:write:bot
interactive components
*/
/////////////////////////////////////////////////////////////////////////
// グローバル変数
@AWtnb
AWtnb / tweet2slack.js
Last active March 6, 2020 14:37
send tweet log to slack
/*
1日前のツイートをエゴサーチして集約・報告
使用ライブラリ: Moment
*/
////////////////////////////////////////////////////////
// グローバル変数
////////////////////////////////////////////////////////
// token
@AWtnb
AWtnb / dataFinder.js
Created March 18, 2019 15:14
get data from google sheet with gas
/*
slack 経由で辞典のデータを参照
*/
/////////////////////////////////////////////
// グローバル変数
/////////////////////////////////////////////
// シート
var SHEET_ID = PropertiesService.getScriptProperties().getProperty("SHEET_ID");
@AWtnb
AWtnb / kakeibot_on_slack.js
Last active August 14, 2020 05:30
log kakeibo from slack
/*
slack 経由で家計簿を登録して集計する。
- interactive components
- Bot token scopes
- chat:write
- reactions:write
- User token scopes
- channels:history
*/
@AWtnb
AWtnb / zangyoLogger.js
Last active June 12, 2019 03:59
log overwork time to google calendar
/*
Wifiから切断された時点のタイムスタンプを IFTTT でシートに取得して定時からの差分で残業時間を google カレンダーに自動登録する。
時刻トリガーで深夜に定期実行。
使用ライブラリ: Moment
*/
///////////////////////////////////////////////////////
// グローバル変数
///////////////////////////////////////////////////////