Skip to content

Instantly share code, notes, and snippets.

@enomoto
enomoto / generate_jwt.rb
Last active November 13, 2023 05:29
Generate JWT for App Store Connect API
require 'jwt'
require 'openssl'
# App Store Connect APIキー (.p8ファイル) の内容を読み込む
ecdsa_key = OpenSSL::PKey::EC.new(File.read("/path/to/your.p8"))
# Issuer ID (App Store Connectから取得)
# https://appstoreconnect.apple.com/access/api
issuer_id = "your_issuer_id"
jq '.data.associatedAccounts[] | select(.contentProvider.name == "YOUR PROVIDER NAME") | .contentProvider.contentProviderId' detail_formatted.json
@enomoto
enomoto / pkl.md
Created February 25, 2024 07:50
Search for Pkl
const hideHeaderAndFooter = (document) => {
const noneDisplayQuerySelectors = [
"#shopify-section-announcement-bar",
"#shopify-section-announcement",
"#shopify-section-header",
"#shopify-section-footer",
"shop-login-button"
]
noneDisplayQuerySelectors.forEach((querySelector) => {
const element = document.querySelector(querySelector)
//
// login_form_hook
//
document.querySelector("#customer_login")?.addEventListener("submit", () => {
const email = document.querySelector('input[name="customer[email]"]')?.value ?? ""
const object = {
"email": email,
}
webkit.messageHandlers.accountLogin.postMessage(object)
})