Skip to content

Instantly share code, notes, and snippets.

query GitLabIssue($projectPath: ID!) {
project(fullPath: $projectPath) {
name
issueCount: issueStatusCounts(types: ISSUE) {
all
closed
opened
}
issueToDoCount: issueStatusCounts(labelName: ["status::ToDo"]) {
all
[sources.from_pubsub]
type = "http"
address = "0.0.0.0:8080"
path = "/"
encoding = "json"
[transforms.parse_pubsub_payload]
type = "remap"
inputs = ["from_pubsub"]
source = '''
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..3494874
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,10 @@
+root = true
+
+[*]
+end_of_line = lf
@nakatanakatana
nakatanakatana / gce-docker-logging.md
Last active May 23, 2020 17:36
GCE上にdocker contaienr をデプロイしたときのログまわりの動作(確認中)

GCE上でdockerコンテナを動かす時のログまわりのメモ

ドキュメント

課題点

  • zap + zapdriverをつかってログを構成しているアプリをcrond経由で動かしたときに構造化ログがjsonPayloadにうまく展開されない
    • ログ自体は入るがjsonPayload.messageにテキストとしてJSONが入る

確認したこと

@nakatanakatana
nakatanakatana / cloud_run-grafana.md
Last active July 5, 2021 15:42
Cloud Run上でGrafanaを動かしてみるやつ

Cloud SQL の設定

  • 画面からぽちぽち (MySQL, 5.7互換)
  • DB, userの作成

GCRにimageをデプロイ

  • 現状Cloud Runにデプロイできる対象がGCRにあるものだけため
  • grafana/grafana:6.6.1 を自前のプロジェクトのgcr.ioにアップロード
@nakatanakatana
nakatanakatana / init.sh
Last active February 18, 2020 11:26
initialize
sudo apt update
sudo apt upgrade -y
# install homebrew
function install_brew () {
sudo apt install -y build-essential curl file git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
export PATH=$PATH:~/.linuxbrew/bin
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: node-exporter
spec:
template:
metadata:
labels:
app: node-exporter
annotations:
@nakatanakatana
nakatanakatana / plantuml_cli.go
Last active August 31, 2017 03:59
plantuml_serverに渡す文字列を生成する。
package main
import (
"fmt"
"bytes"
"strings"
"compress/zlib"
"math"
)