Skip to content

Instantly share code, notes, and snippets.

View laughingman7743's full-sized avatar
🤣

laughingman7743

🤣
  • Nagoya
  • 00:42 (UTC +09:00)
View GitHub Profile
@maratori
maratori / .golangci.yml
Last active May 16, 2025 13:52
Golden config for golangci-lint
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021-2025 Marat Reymers
## Golden config for golangci-lint v2.1.6
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt it to suit your needs.
# If this config helps you, please consider keeping a link to this file (see the next comment).
@rawc0der
rawc0der / crd2jsonschema.sh
Last active September 18, 2024 14:42
Extract openapi JSON schema from Kubernetes CRD manifest
#!/bin/bash
# Small utility function based on yq to extract openAPIV3Schema from CRD
# example: crd2jsonschema.sh ./crd-alertmanager.yaml
set -e
function crd2jsonschema() {
set -e
local xkgroup="x-kubernetes-group-version-kind"
local document="$1"
local openAPIV3Schema=$(mktemp -u)
@Ogaday
Ogaday / README.md
Last active August 7, 2022 13:33
Prefect on Dask on Kubernetes
@voluntas
voluntas / loadtest.rst
Last active April 4, 2025 05:26
負荷試験コトハジメ
@hajimeni
hajimeni / jolokia.py
Last active May 28, 2019 05:03
DataDog Jolokia AgentCheck
# stdlib
import re
import copy
# 3rd party
import requests
# project
from checks import AgentCheck
@hiroyuki-sato
hiroyuki-sato / embulk.md
Last active March 10, 2021 04:52
embulk plugin developer guide (WIP)

注意: まだ書きかけです。

プラグインを開発する

このガイドでは、Embulkのプラグインを開発する方法を説明します。

新しいプラグインを作ることで、新規のクラウドサービスからデータを取得したり、新しいデータウェアハウスシステムにデータを出力できるようになります。

入力から出力まで全てのプラグインを開発する必要はありません。Embulkには既に多くのプラグインが提供されています。既存のプラグインでは足りない部分だけを開発すれば良いのです。

@sonots
sonots / out_forward.conf
Last active November 2, 2021 06:14
ログの欠損をできるだけ避ける Fluentd の out_forward 設定サンプル cf. http://blog.livedoor.jp/sonots/archives/44690980.html
<source>
type in_tail
# ...
tag raw.eventlog
</source>
<match raw.**>
type forward
log_level "#{ENV['DEBUG'] ? 'debug' : 'info'}"
@bloodredsun
bloodredsun / ExampleThatLogs.java
Last active March 9, 2022 08:16
Unit testing logback based logging statements
package com.brs;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Simple class that we use to trigger a log statement.
*/
public class ExampleThatLogs {
@abevoelker
abevoelker / pipelines.py
Last active March 17, 2024 05:59
scrapy RabbitMQ pipeline
# project_name/pipelines.py
from scrapy import signals
from scrapy.utils.serialize import ScrapyJSONEncoder
from scrapy.xlib.pydispatch import dispatcher
from carrot.connection import BrokerConnection
from carrot.messaging import Publisher
from twisted.internet.threads import deferToThread
@jmervine
jmervine / 1_http_hello.go
Last active December 17, 2024 12:10
Golang - Hello PATH HTTP Server Example
package main
import (
"fmt"
"log"
"net/http"
)
func Log(handler http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {