This file contains hidden or 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 Payload struct { | |
// 省略. | |
Type *string `json:"type"` | |
WebOrderLineItemID *string `json:"webOrderLineItemId"` | |
Unknown map[string]json.RawMessage `json:"-"` | |
} | |
// NOTE: omitempty など json tag を追加する場合は修正が必要. | |
func (r *Payload) UnmarshalJSON(b []byte) error { | |
rv := reflect.ValueOf(r).Elem() |
This file contains hidden or 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 | description | subtype | |
---|---|---|---|
CONSUMPTION_REQUEST | 返金リクエスト開始 | ||
DID_CHANGE_RENEWAL_PREF | サブスクリプションプランをアップグレード・ダウングレード | 1. UPGRADE 2. DOWNGRADE | |
DID_CHANGE_RENEWAL_STATUS | サブスクリプションの自動更新を再度有効化・無効化 | 1. AUTO_RENEW_ENABLED 2. AUTO_RENEW_DISABLED | |
DID_FAIL_TO_RENEW | サブスクリプションの購入失敗 | 1. GRACE_PERIOD(決済猶予期間のため使用可能) 2. ''(利用停止できる) | |
DID_RENEW | サブスクリプション正常更新 | 1. BILLING_RECOVERY(期限切れのサブスクリプションが更新成功) 2. ''(自動更新成功) | |
EXPIRED | サブスクリプションが期限切れ | 1. VOLUNTARY(更新を無効にして期限切れ) 2. PRICE_INCREASE(値上げに同意せず期限切れ) | |
GRACE_PERIOD_EXPIRED | サブスクリプションを更新せずに決済猶予期間が終了したため利用停止できる | ||
OFFER_REDEEMED | プロモーション・オファーまたはオファーコードの引き換え | 1. INITIAL_BUY 2. RESUBSCRIBE 3. UPGRADE 4. DOWNGRADE 5. ''(利用中のサブスクリプションのオファーの引き換え) | |
PRICE_INCREASE | システムが自動更新できるサブスクリプションの価格上昇をユーザーに通知 | 1. PENDING 2. ACCEPTED(同意した場合もしくは同意が不要の場合) |
This file contains hidden or 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
- INITIAL_BUY | |
- INTERACTIVE_RENEWAL | |
- CANCEL | |
- PRICE_INCREASE_CONSENT | |
+ OFFER_REDEEMED | |
+ EXIRED | |
+ GRACE_PERIOD_EXPIRED | |
+ PRICE_INCREASE |
This file contains hidden or 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
package service | |
import ( | |
"bytes" | |
"context" | |
"fmt" | |
"io" | |
"os/exec" | |
) |
This file contains hidden or 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
FROM ubuntu:latest | |
RUN apt update -y && apt install -y git gettext \ | |
libtinfo-dev libacl1-dev \ | |
libgpm-dev build-essential \ | |
file gdb && \ | |
\ | |
git clone --depth 1 https://github.com/vim/vim.git && \ | |
cd ./vim && make && make install && \ | |
sed -i -e "s?^#\(CFLAGS = -g$\)?\1?g" ./src/Makefile && \ |
This file contains hidden or 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
{"schemaVersion":1,"style":"for-the-badge","label":"startuptime","message":"17.33 msec","logoColor":"#019733","color":"brightgreen","namedLogo":"vim"} |
This file contains hidden or 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
name: vim-startuptime | |
on: [push, pull_request] | |
env: | |
GIST_TOKEN: ${{ secrets.GIST_TOKEN }} | |
jobs: | |
measure-speed: | |
runs-on: ubuntu-latest |
This file contains hidden or 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
mkdir -p lambda-layer/python && \ | |
pip3 install \ | |
--platform manylinux2014_x86_64 \ | |
--target=lambda-layer/python \ | |
--implementation cp \ | |
--python-version 3.11 \ | |
--only-binary=:all: \ | |
--no-deps \ | |
openai>=1.0.0 \ | |
pydantic>=2.0.0 \ |
This file contains hidden or 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
import zipfile | |
import os | |
import sys | |
def create_reproducible_zip(source_dir, output_path, exclude_prefix=None): | |
with zipfile.ZipFile(output_path, "w", zipfile.ZIP_DEFLATED) as zf: | |
for root, _, files in os.walk(source_dir): | |
for file in sorted(files): | |
full_path = os.path.join(root, file) | |
rel_path = os.path.relpath(full_path, source_dir) |