This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub insertRowAndCopyValue() | |
' | |
' insertRowAndCopyValue | |
' T列に値が入っていたら下に行を追加して、その行に各種値をコピーする(一行目は除く) | |
' | |
' | |
Dim lastRow As Long | |
Dim i As Long | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function deleteDMsByChannelId() { | |
const token = 'slack_api_token'; // Slack APIのUserトークン(xoxp-)を設定 | |
const channel_id = 'im_id'; // 削除するダイレクトメッセージのチャンネルID(DMの中のメッセージのリンクの「archive/****」の部分)を設定 | |
const api_endpoint = 'https://slack.com/api/conversations.history?channel=' + channel_id; | |
// DMのメッセージ履歴を取得 | |
const response = UrlFetchApp.fetch(api_endpoint, { | |
'headers': { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sed -i.bak -e "s/http:\/\/archive\.ubuntu\.com/http:\/\/jp\.archive\.ubuntu\.com/g" /etc/apt/sources.list | |
sudo apt update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# スクリプト自身のディレクトリを確実に格納 | |
SCRIPT_DIR=$(cd $(dirname $0); pwd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> // cout, endl, cin | |
#include <string> // string, to_string, stoi | |
#include <vector> // vector | |
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound | |
#include <utility> // pair, make_pair | |
#include <tuple> // tuple, make_tuple | |
#include <cstdint> // int64_t, int*_t | |
#include <cstdio> // printf | |
#include <map> // map | |
#include <queue> // queue, priority_queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"properties": { | |
"key": { | |
"type": "string" | |
}, | |
"value": { | |
"type": "string" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"properties": { | |
"$content-type": { | |
"type": "string" | |
}, | |
"$content": { | |
"type": "string" | |
}, | |
"$formdata": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"properties": { | |
"$formdata": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"key": { | |
"type": "string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$content-type": "application/x-www-form-urlencoded", | |
"$content": "*****************", | |
"$formdata": [ | |
{ | |
"key": "token", | |
"value": "*****************" | |
}, | |
{ | |
"key": "team_id", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT date, | |
accounts.num_locked_users, | |
accounts.num_disabled_accounts, | |
accounts.num_delegated_admins, | |
accounts.num_super_admins, | |
accounts.num_suspended_users, | |
accounts.num_users | |
FROM api_project_name.dataset_name.usage | |
WHERE accounts.num_users IS NOT NULL | |
ORDER BY date ASC; |
NewerOlder