Skip to content

Instantly share code, notes, and snippets.

@MSakamaki
MSakamaki / gmailCleanup.js
Created April 2, 2022 04:23 — forked from gabmontes/gmailCleanup.js
Google Apps script to cleanup messages from GMail.
// Inspired in http://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script
// Deletes old marked conversations
function cleanUp() {
var delayDays = 5; // # of days before messages are moved to trash
var label = "Delete me"; // label to identify the messages
var maxDate = new Date(Date.now() - delayDays * 24 * 60 * 60 * 1000);
var userLabel = GmailApp.getUserLabelByName(label);
if (!userLabel) {
return;
@MSakamaki
MSakamaki / heroku_mobtime.md
Last active February 1, 2022 14:50
heroku infomation

heroku + mobtime

clone repository

git clone https://github.com/mobtimeapp/mobtime.git

add package.json scripts

@MSakamaki
MSakamaki / pgv.json
Last active December 13, 2023 11:22
pg version
{
"version": "fae0bde4-2075-4f21-b563-3cd619eb8fc1"
}
@MSakamaki
MSakamaki / setting-testlint.md
Last active December 30, 2019 04:50
Textlint settings for yourself

textlint settings

textlint install

npm i -g textlint
npm i -g textlint-rule-preset-japanese
npm i -g textlint-rule-preset-ja-technical-writing
npm i -g textlint-rule-spellcheck-tech-word
npm i -g textlint-rule-preset-ja-spacing
@MSakamaki
MSakamaki / README.md
Created September 13, 2019 03:30
owasp zap memo

Docker image with Owasp Zed Attack Proxy preinstalled

HUD

WIKI

docker run -u zap -p 9090:9090 -i owasp/zap2docker-weekly zap.sh -daemon -host 0.0.0.0 -port 9090 \
-config api.addrs.addr.name=.* -config api.addrs.addr.regex=true -config api.key=< your api key > \
-config hud.enabledForDaemon=true
@MSakamaki
MSakamaki / README.md
Last active August 24, 2019 08:32
nest library workspace-schematic for nrwl

nest library workspace-schematic for nrwl

Note: Temporary code

1. Install nest cli

npm install -D @nestjs/cli
@MSakamaki
MSakamaki / README.md
Last active June 13, 2020 07:15
nest/cli workspace-schematic for nrwl

1. Install nest cli

npm install -D @nestjs/cli

2. Generate workspace-schematic

@MSakamaki
MSakamaki / script.js
Created June 14, 2019 13:58
google app script example
function columnStart() {
return 3;
}
function replaceHyperlink(str){
var splitStr = str.split('\"');;
return {
url: splitStr[1],
name: splitStr[3],
};
@MSakamaki
MSakamaki / sample.mjs
Last active April 25, 2019 11:05
dynamic loading
export const sample = () => console.log('CALL MJS');
@MSakamaki
MSakamaki / api-concept.txt
Last active March 1, 2019 10:50
rest api
GET /datas <= データ一覧取得
GET /datas/id <= 1件のデータ取得
GET /datas/id/column <= 特定データの特定項目を取得
POST /datas <= データ発生 (ここでIDができる)
PUT /datas/id <= 特定データの一括更新
PUT /datas/id/column <= 特定データを1個だけ更新
PATCH /datas/id <= 特定データの部分項目を更新
DELETE /datas/id <= 特定のリソース削除