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 / SumatraPDF-settings.txt
Last active November 25, 2019 05:43
sumatra PDF setting
# For documentation, see http://www.sumatrapdfreader.org/settings3.2.html
MainWindowBackground = #fffde7
EscToExit = false
ReuseInstance = false
UseSysColors = false
RestoreSession = true
FixedPageUI [
TextColor = #000000
@AWtnb
AWtnb / style.less
Last active May 20, 2020 01:52
vscode_markdown-preview-enhanced-style
.markdown-preview.markdown-preview {
@accentColor: #3498db;
@backgroundColor: #ffffff;
@foregroundColor: #333333;
@accentFont: 'Source Han Code JP N', Verdana, Arial, Helvetica, Roboto, sans-serif;
@baseFont: "HelveticaNeue", Arial, "HiraginoKakuGothicProN", "HiraginoSans", Meiryo, sans-serif;
@borderColor: #aaa;
@codeDark: #364352;
@codeLight: #f2f2f2;
@AWtnb
AWtnb / workLog.js
Created September 14, 2019 12:03
log work achievement with trello
/*
シートからその日に終わらせた仕事を取得して記録
*/
/////////////////////////////////////////////
// グローバル変数
/////////////////////////////////////////////
// シート
var SHEET_ID = PropertiesService.getScriptProperties().getProperty("SHEET_ID");
@AWtnb
AWtnb / getGoogleSheetData.js
Created July 31, 2019 12:58
API to get data on google sheet
/*
googleスプレッドシート内の情報を返すAPI
*/
function getDataOnSheet() {
var SHEET_ID = PropertiesService.getScriptProperties().getProperty("SHEET_ID");
var sht = SpreadsheetApp.openById(SHEET_ID).getSheets();
var maxRow = sht[0].getLastRow();
var data = sht[0].getRange(2, 1, maxRow - 1, 4).getValues();
var ret = [];
@AWtnb
AWtnb / trainingManager.js
Last active August 2, 2019 13:12
training manager on slack
/*
今日のトレーニングを slack で確認してカレンダーに登録
incomming webhook
interactive component
*/
///////////////////////////////////////////////////////
// global variables
///////////////////////////////////////////////////////
@AWtnb
AWtnb / newChannelNotifier.js
Last active September 28, 2019 09:55
notify new Channel on slack
/*
ワークスペースに追加されたチャンネルをシートに追加して定時で slack に通知
*/
///////////////////////////////////////////////////////
// グローバル変数
///////////////////////////////////////////////////////
@AWtnb
AWtnb / log.md
Last active June 27, 2020 08:52
powershell custom cmdlets

2020-06-27 moved to pwsh

@AWtnb
AWtnb / lotteryOnSlack.js
Last active June 26, 2019 04:10
lottery on slack
/*
slash command
ランダムに複数の要素を選ぶ抽選
*/
// 配列中の複数要素をランダムに取得する関数
// https://miya2000.hatenadiary.org/entry/20080607/p0
function randomChoose (array, num) {
var a = array;
@AWtnb
AWtnb / getBookInfo.js
Last active June 2, 2019 13:56
get book information by ISBN
/*
slash command
ISBN から書誌情報を取得する
自社の本であれば5桁のみでマッチ
*/
// ISBN 12桁の末尾にからチェックディジットを追加する関数
function appendCheckDigit (isbn12) {
var array = String(isbn12).split("")
var total = 0;
@AWtnb
AWtnb / wheel_tab_changer_on_chrome.ahk
Created May 21, 2019 04:43
tab changer with Autohotkey
;; Wheel Scroll Tabs for Google Chrome
#If WinActive ("ahk_class Chrome_WidgetWin_1") || WinActive ("ahk_class SUMATRA_PDF_FRAME")
~$WheelUp::
MouseGetPos, x, y
If (y < 45) {
Send, ^+{Tab}
}
else {