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 / create-pull-request.yaml
Last active October 14, 2025 02:39
Automate PR for Production
name: Create and Update Pull Request for Production Release
on:
push:
branches:
- main
jobs:
create_and_update_pr:
runs-on: ubuntu-latest
steps:
INTERNAL Error:
Value::LIST(values) cannot be used to make an empty list - use Value::LIST(type, values) instead
Stack Trace:
0 _ZN6duckdb9ExceptionC2ENS_13ExceptionTypeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 64
1 _ZN6duckdb17InternalExceptionC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 20
2 _ZN6duckdb5Value4LISTENS_6vectorIS0_Lb1EEE + 272
3 _ZN6duckdb10YAMLReader15YAMLNodeToValueERKN4YAML4NodeERKNS_11LogicalTypeE + 2904
4 _ZN6duckdb10YAMLReader15YAMLNodeToValueERKN4YAML4NodeERKNS_11LogicalTypeE + 2156
@yuya-maemichi-synspective
yuya-maemichi-synspective / compose.yaml
Last active May 22, 2025 03:47
use Docker Compose with uv workspace
services:
package-name:
build:
dockerfile: ./packages/package-name/Dockerfile
secrets:
- source: github_token
target: GITHUB_TOKEN
target: builder
entrypoint: /opt/uv/uv run cli-name
environment:
# init
set --local modules
set --erase modules
terraform state list |
grep -E '^module.mas_\w+' -o |
sort -u |
while read m
set --append modules $m
end

minor problems

Python packages

  • pandas-gbq should not bundle setuptools as a runtime dependency
@yuya-maemichi-synspective
yuya-maemichi-synspective / interval.py
Created March 13, 2025 02:33
math complementable interval in Python
from __future__ import annotations
from dataclasses import dataclass, replace
import math
from numbers import Number
from typing import Tuple
NEG_INF = -math.inf
POS_INF = math.inf
@dataclass(frozen=True)
import unittest
class RandomTestLoader(unittest.TestLoader):
@staticmethod
def sortTestMethodsUsing(_a, _b):
from random import choice
return choice((-1, 0, 1))
@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.,