Skip to content

Instantly share code, notes, and snippets.

View cuiweiqiang's full-sized avatar
🎯
Focusing

Cui cuiweiqiang

🎯
Focusing
View GitHub Profile
@cuiweiqiang
cuiweiqiang / Readme.md
Created July 15, 2023 04:18 — forked from petrov9/Readme.md
Full logstash config with grok patterns. Grok pattern for Nginx, Tomcat, Spring

Below you can see the full work example for logstash.conf file

There are grok patterns for:
Nginx:
* access.log
* error.log
Tomcat:
* site.log
* localhost.log

  • site_access_log.txt
@cuiweiqiang
cuiweiqiang / apt-daily-timer-disable.md
Created October 27, 2022 07:25 — forked from noromanba/apt-daily-timer-disable.md
how to disable apt-daily.timer

how to disable apt-daily.timer

$ systemctl stop apt-daily.timer
$ systemctl disable apt-daily.timer
$ systemctl mask apt-daily.service
$ systemctl daemon-reload

check current status

golang.org rate limiter:

	rl := rate.NewLimiter(1000000, 1)
 
	last := time.Now()
	for i := 0; i < 10; i++ {
		rl.Wait(context.Background())
		cur := time.Now()
		fmt.Println("last", cur.Sub(last))
 last = cur
@cuiweiqiang
cuiweiqiang / README.md
Created November 27, 2017 08:03 — forked from Luzifer/README.md
Running docker-compose as a systemd service

Running docker-compose as a systemd service

Files

File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
@cuiweiqiang
cuiweiqiang / LC_CTYPE.txt
Created October 16, 2017 06:11 — forked from thanksdanny/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@cuiweiqiang
cuiweiqiang / Sublime Text 3 Build 3103 License Key - CRACK
Created May 26, 2016 16:33
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@cuiweiqiang
cuiweiqiang / gist:f67bf1b362deb25265cc
Last active January 7, 2016 03:27
垃圾站列表
001nlp.com
111cn.net
151.com.tw
15meili.com
258369.cn
2845.com
28im.com
360doc.com
3v4.net
4byte.cn
@cuiweiqiang
cuiweiqiang / latex install
Created October 23, 2015 12:14 — forked from melvincabatuan/latex install
Centos 7 latex install
yum -y install texlive texlive-latex texlive-xetex
yum -y install texlive-collection-latex
yum -y install texlive-collection-latexrecommended
yum -y install texlive-xetex-def
yum -y install texlive-collection-xetex
Only if needed:
yum -y install texlive-collection-latexextra