Skip to content

Instantly share code, notes, and snippets.

View yuya-maemichi-synspective's full-sized avatar
🛰️
spaced out

Yuya Maemichi yuya-maemichi-synspective

🛰️
spaced out
View GitHub Profile
@yuya-maemichi-synspective
yuya-maemichi-synspective / URL-pageState.sh
Last active June 20, 2024 03:23
Google Cloud snippets
pbpaste |
ruby -r{uri,cgi} -lpe'$_=CGI.parse(URI($_).query)["pageState"][0]' |
nkf --url-input |
tr '()' '{}' |
jq -rc '..|strings' |
sed -E 's/_([[:xdigit:]]{2})/%\1/g' |
nkf --url-input |
jq '.'
tr -s '[:space:]' '[-*]'

list

  • adding a bot user to a channel

    1. hover the mouse cursor to the bot user name @bot-user-name.
    2. select "Add this app to a channel…".
    3. select the channel from the drop-down list.
  • adding a webhook to a channel without reinstalling

    1. open the app building page under https://api.slack.com/apps/
    2. open the webhook page; e.g.,
*
異常検知のための未来予測:オウム返し的手法からHolt-Winters
Methodまで
アイテムの種類 ウェブページ
著者名 たくち
抄録 Holt-Winters Method(別名: Triple Exponential Smoothing)とい
うデータの予測手法がある。これについて素晴らしい解説記事があるので読
document.querySelector`body > .versions > .list > .other > a`.click()
y = 2024
t0 = Time.new(y)
year_seconds = Time.new(y + 1) - t0
c = 100
c.times.map { t0 + (year_seconds / c * _1) }
find ~ \
-path "$HOME/.Trash" -prune -or \
-path "$HOME/Library" -prune -or \
-path '*/node_modules' -prune -or \
-path '*/.idea/*.iml' -type f -print
git remote |
xargs -n1 -I% git symbolic-ref refs/remotes/%/HEAD |
cut -d/ -f4
softwareupdate --fetch-full-installer --full-installer-version '13.6' &&
open '/Applications/Install macOS Ventura.app'
@yuya-maemichi-synspective
yuya-maemichi-synspective / FileUpload.ts
Last active November 22, 2023 06:47
Slack SDK has a loose typing
// https://github.com/slackapi/node-slack-sdk/blob/1312f6222497ca58af6788ea32744d7fd85964ce/packages/web-api/src/methods.ts#L1975-L1984
type Buffer = object;
type Stream = object;
type FileUpload = (
| {
channels?: string; // comma-separated list of channels
}
| {