Skip to content

Instantly share code, notes, and snippets.

View Sho2010's full-sized avatar

Sho Sho2010

  • 06:48 (UTC +09:00)
View GitHub Profile
#!/usr/bin/env bash
K8S_VERSION=1.33
echo "*** CHECK EKS ADDON SUPPORT VERSIONS ***"
echo Next Version: ${K8S_VERSION}
echo ---
echo CoreDNS
echo Current
@Sho2010
Sho2010 / zundamon.py
Last active February 22, 2024 09:05
slack `/zundamon` command
# https://cloud.google.com/functions/docs/first-python
from slack_bolt import App
from slack_bolt.adapter.google_cloud_functions import SlackRequestHandler
import functions_framework
import logging
import requests
import urllib.parse
logging.basicConfig(level=logging.DEBUG)
@Sho2010
Sho2010 / changed-files-trigger-matrix-example.yaml
Last active June 1, 2023 06:26
github actionsで`tj-actions/changed-files` を使って 変更されたディレクトリをmatrix処理する
name: matrix example
on:
push
jobs:
get_dirs:
runs-on: ubuntu-latest
outputs:
dirs: ${{ steps.changed-dirs.outputs.all_changed_files }}
package audit
import (
"fmt"
"os"
"reflect"
"time"
)
// Global Channel
package main
// 書籍「Go言語による並行処理」teeチャネル
// linux tee commandのようにストリームを2つに分けて同じ値を飛ばす
func Tee(done <-chan struct{}, in <-chan interface{}) (<-chan interface{}, <-chan interface{}) {
out1 := make(chan interface{})
out2 := make(chan interface{})
go func() {
defer close(out1)
# See: https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params
WEBHOOK_URL="YOUR_DISCORD_WEBHOOK"
curl \
--request POST \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{ \"content\": \"test\" }" \
${WEBHOOK_URL}
# Ctrl-n Ctrl-p でスクロールをループさせる
export FZF_DEFAULT_OPTS='--cycle'
@Sho2010
Sho2010 / golang_memo.md
Last active December 9, 2020 16:50
golang memo