Skip to content

Instantly share code, notes, and snippets.

View s5unty's full-sized avatar

Sun Wuan s5unty

View GitHub Profile
lib/App/ClusterSSH.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git lib/App/ClusterSSH.pm lib/App/ClusterSSH.pm
index 707865e..55a2b1f 100644
--- lib/App/ClusterSSH.pm
+++ lib/App/ClusterSSH.pm
@@ -727,7 +727,7 @@ sub open_client_windows(@) {
"'"
. $self->config->{title} . ': '
@s5unty
s5unty / proxy.diff
Created February 6, 2015 09:54
Add proxy support in calendar.vim
autoload/calendar/webapi.vim | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git autoload/calendar/webapi.vim autoload/calendar/webapi.vim
index 044570c..f07e134 100644
--- autoload/calendar/webapi.vim
+++ autoload/calendar/webapi.vim
@@ -153,7 +153,7 @@ function! s:request(json, async, url, ...)
endif
endif
@s5unty
s5unty / cqlb_txt.patch
Created March 17, 2015 07:53
升级超强二笔的码表以支持自造词功能 #erbi #fcitx #cqlb
--- cqlb30.txt.orig 2015-03-17 15:47:47.589370961 +0800
+++ cqlb30.txt.rule 2015-03-17 15:50:58.849377706 +0800
@@ -1,15 +1,24 @@
;fcitx Version 0x03 Table file
+;超强二笔120309码表:http://fds8866.ys168.com/
+;解开后参考erbi码表:http://fcitx.github.io/handbook/sect1-code-table.html
+;
+;1. 添加了 InvalidChar、删除了标点符号。
+; 使得标点可以直接上屏。
+;
@s5unty
s5unty / Dockerfile
Created December 14, 2015 13:15
docker env for the SaltStack study
FROM salt-minion
ADD salt-2015.5.3+ds-1trusty1 /var/tmp/
RUN sh -c "dpkg -i /var/tmp/salt-2015.5.3+ds-1trusty1/*.deb || apt-get install -y -f"
RUN touch /var/log/salt/minion
ENTRYPOINT service salt-minion restart && tail -f /var/log/salt/minion
@s5unty
s5unty / goaccess.conf
Last active February 8, 2018 01:04
256-light
# 贴到 $HOME/.goaccessrc
color COLOR_MTRC_HITS color27:color254
color COLOR_MTRC_VISITORS color161:color254
color COLOR_MTRC_DATA color28:color254
color COLOR_MTRC_BW color173:color254
color COLOR_MTRC_AVGTS color240:color254
color COLOR_MTRC_CUMTS color130:color254
color COLOR_MTRC_MAXTS color92:color254
color COLOR_MTRC_PROT color161:color254
color COLOR_MTRC_MTHD color75:color254
@s5unty
s5unty / powerline.bdf
Created March 10, 2019 02:11
vim-powerline symbols
COMMENT #####################
COMMENT vim-powerline symbols
COMMENT - <U2B60>...<U2B62>
COMMENT - <U2B80>...<U2B83>
COMMENT #####################
STARTCHAR U+2B60
ENCODING 11104
SWIDTH 360 0
DWIDTH 10 0
BBX 10 20 0 -6
@s5unty
s5unty / ical2rem.pl
Last active November 25, 2019 09:28
A script to convert from the iCal / ICS format the format used by Remind
#!/usr/bin/perl -w
my $debug = 0;
#
# ical2rem.pl -
# Reads iCal files and outputs remind-compatible files. Tested ONLY with
# calendar files created by Mozilla Calendar/Sunbird. Use at your own risk.
# Copyright (c) 2005, 2007, Justin B. Alcorn
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@s5unty
s5unty / error.log
Created December 5, 2019 08:29
sqlite 2 postgresql
mmonit=> INSERT INTO messageformat VALUES(
mmonit(> 1,
mmonit(> 'Default',
mmonit(> 'mmonit@verns-worktop',
mmonit(> 'M/Monit report ($HOST: $EVENT $SERVICE on $DATE)',
mmonit(> 'M/Monit report ($COUNT events)',
mmonit(> NULL,
mmonit(> replace('Date: $DATE\nHost: $HOST\nService: $SERVICE\nAction: $ACTION\nDescription: $DESCRIPTION\n\n','\n',char(10)),
mmonit(> replace('\nYour faithful employee,\nM/Monit','\n',char(10)),
mmonit(> replace('<html>\n <table style=''border-collapse:collapse;border:1px solid #eee; padding:5px;''>\n <tr>\n <th style=''border: 1px solid #eee; padding:5px;''><b>Date</b></th>\n <th style=''border: 1px solid #eee; padding:5px;''><b>Host</b></th>\n <th style=''border: 1px solid #eee; padding:5px;''><b>Service</b></th>\n <th style=''border: 1px solid #eee; padding:5px;''><b>Action</b></th>\n <th style=''border: 1px solid #eee; padd
@s5unty
s5unty / mfscli2prom.awk
Last active December 8, 2022 20:19
parse the mfscli output and write the metrics
#!/usr/bin/awk -f
#
# usage:
#
# % /usr/bin/mfscli -ns"#" -SIM -SMU -SIG -SCS -SIC -SSC -SQU | ./mfscli2prom.awk
#
# moosefs >= v3.0.105
#
BEGIN {
@s5unty
s5unty / mfs.mtail
Last active May 5, 2020 01:34
parse the mfscli output and write the metrics
# usage:
# $ mfscli -np -SIM -SIG | mtail -one_shot -progs mfs.mtail -logs -
# OR
# $ mtail -progs mfs.mtail -logs mfscli.log
# $ mfscli -np -SIM -SIG > mfscli.log
#
# -SIM {{{
text metadata_servers_state by ip, version
gauge metadata_servers_cpu_all by ip, version