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 / voteOnSlack.js
Last active December 25, 2019 06:42
easy vote on slack
/*
slash command
多数決を簡単に行う
*/
/////////////////////////////////////////////////////////////////////////
// グローバル変数
/////////////////////////////////////////////////////////////////////////
//token
@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 / 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 / nayose.js
Created May 15, 2019 08:56
nayose on slack
/*
slash command
Microsoft Excel からコピペしたタブ区切りの複数行文字列を名寄せする
*/
// 名寄せ関数
function nayose (str) {
var table = {};
var lines = str.split(/[\r\n]+/g);
// 集約
@AWtnb
AWtnb / config.yaml
Last active May 21, 2019 05:54
terminus config
hotkeys:
shell:
powershell:
- - Ctrl-T
profile: {}
new-tab: []
close-tab:
- - Ctrl-W
rename-tab: []
split-right: []
@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 {
@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 / 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 / log.md
Last active June 27, 2020 08:52
powershell custom cmdlets

2020-06-27 moved to pwsh

@AWtnb
AWtnb / newChannelNotifier.js
Last active September 28, 2019 09:55
notify new Channel on slack
/*
ワークスペースに追加されたチャンネルをシートに追加して定時で slack に通知
*/
///////////////////////////////////////////////////////
// グローバル変数
///////////////////////////////////////////////////////