Skip to content

Instantly share code, notes, and snippets.

View tomoyk's full-sized avatar
🐳
Containerize

Tomoyuki KOYAMA tomoyk

🐳
Containerize
View GitHub Profile

タイトルとURLをMarkdown形式でコピー

v1

javascript:a=prompt('mdlink','['+document.title+']('+document.location.href+')');a.preventDefault;

v2

items:
- colors:
name: 3024 (dark)
author: Chris Kempson
primary:
background: "#090300"
foreground: "#a5a2a2"
cursor:
text: "#090300"
cursor: "#a5a2a2"
@tomoyk
tomoyk / .zshrc
Last active August 27, 2023 01:32
# NOTE:
# font:
# https://github.com/miiton/Cica
# golang:
# https://golang.org/dl/
# zsh-completions:
# https://github.com/zsh-users/zsh-completions
# sudo apt install xsel figlet peco
# ghq:
# go get github.com/motemen/ghq
import re
match_pattern = (
# '[2022-05-12T00:57:09.548Z]'
r"\[(?P<DateTime>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)]"
r' "(?P<Method>\w+)' # 'GET'
r" (?P<Path>[^ ]+)" # '/author'
r' (?P<Protocol>[^ ]+)"' # 'HTTP/1.1'
r" (?P<Status>\d{,3})" # '200'
@tomoyk
tomoyk / checker.sh
Created August 19, 2022 10:39
HTTP Monitoring Script
#!/bin/bash -eu
target_url="http://192.168.5.x/"
timeout_sec=3
logfile="logs/check.log"
mkdir logs || true
touch $logfile
while :
do

環境

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql-deployment
spec:
selector:
matchLabels:
app: mysql
template:
metadata:
from locust import HttpUser, task
import os.path
import glob
import uuid
class StartUser(HttpUser):
@task
def on_start(self):