Skip to content

Instantly share code, notes, and snippets.

View AWtnb's full-sized avatar
i love coffee

AWtnb AWtnb

i love coffee
View GitHub Profile
@AWtnb
AWtnb / zangyoLogger.js
Last active June 12, 2019 03:59
log overwork time to google calendar
/*
Wifiから切断された時点のタイムスタンプを IFTTT でシートに取得して定時からの差分で残業時間を google カレンダーに自動登録する。
時刻トリガーで深夜に定期実行。
使用ライブラリ: Moment
*/
///////////////////////////////////////////////////////
// グローバル変数
///////////////////////////////////////////////////////
@AWtnb
AWtnb / exercise_manager.js
Last active March 18, 2019 12:54
manage exercise with slack and google sheet
/*
今日のトレーニングを slack で確認してカレンダーに登録
*/
///////////////////////////////////////////////////////
// グローバル変数
///////////////////////////////////////////////////////
// シート
var SHEET_ID = PropertiesService.getScriptProperties().getProperty("SHEET_ID");
@AWtnb
AWtnb / oldFileCleaner.js
Last active February 25, 2019 13:51
delete old file of slack
/*
slack の特定チャンネルで古くなったファイルを自動的に削除する
http://lyncs.hateblo.jp/entry/2017/06/04/191421 を参考に見よう見まねで実装中
*/
// スクリプトのプロパティからトークンの値をグローバル変数として取得
var SLACK_ACCESS_TOKEN = PropertiesService.getScriptProperties().getProperty("TOKEN_PERSONAL");
// チャンネルIDを取得する関数
// mode : public(パブリックチャンネル) or private (プライベートチャンネル)
@AWtnb
AWtnb / otherFuncs.bas
Created January 18, 2019 06:50
excel vba custom functions
' 参照設定 Microsoft VBScript Regular Expressions
' 参照設定 Microsoft Scripting Runtime
Function Variation(myRng As Range) As Long
' 引数内の範囲に何種類のデータが有るかカウント
'連想配列を利用
Dim myDict As New Scripting.Dictionary
Dim cl As Variant
For Each cl In myRng.Cells
If cl.Value <> "" And myDict.Exists(cl.Value) = False Then