Skip to content

Instantly share code, notes, and snippets.

View llitfkitfk's full-sized avatar
🎯
Focusing

Paul llitfkitfk

🎯
Focusing
View GitHub Profile
# Configuration for telegraf agent
[agent]
## Default data collection interval for all inputs
interval = "10s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
## Telegraf will send metrics to outputs in batches of at most
## metric_batch_size metrics.
@llitfkitfk
llitfkitfk / README.md
Created June 21, 2019 04:35 — forked from cocoastorm/README.md
rexray/s3fs Docker Plugin Install with Minio

Getting Started

Make sure Docker is installed!

Get your Minio endpoint url, accesskey, and secretkey ready!

Install Docker Plugin

docker plugin install rexray/s3fs \
FROM golang:alpine AS builder
RUN apk add --no-cache git make
WORKDIR /home/app
ENV GOPROXY=https://mod.gokit.info
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN make build-linux
@llitfkitfk
llitfkitfk / 0-QuickCmd
Last active June 21, 2019 02:55
Quick Command
quick cmd:
1. docker
2. backup
3. rsync
4. curl
5. ssh-keygen
@llitfkitfk
llitfkitfk / regexCheatsheet.js
Created January 15, 2019 02:40 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@llitfkitfk
llitfkitfk / 0-help-Makefile
Last active December 11, 2019 07:48
makefile collection
.DEFAULT_GOAL := help
.PHONY: help
help: ## list command:
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: start
start: ## start command
@echo "start"
@llitfkitfk
llitfkitfk / git-tag-delete-local-and-remote.sh
Created December 25, 2017 13:51 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName

Redis Cluster Setup with Docker Swarm

Setup

./redis.sh

Test

test the redis cluster

docker exec tomcat sh -c 'kill `ps -aux | grep java|grep -v grep | awk -F " " '"'"'{print $2}'"'"'`'