Skip to content

Instantly share code, notes, and snippets.

View ChinaXing's full-sized avatar
🤣
I may be slow to respond.

chinaxing ChinaXing

🤣
I may be slow to respond.
View GitHub Profile
@ChinaXing
ChinaXing / B-ref-line-and-file.pl
Created August 8, 2013 09:53
use B find out FILE and LINE of reference
# ----------- use B ---------------- #
# B is perl compiler backend
require B;
my $ref = sub {
print "Hello, world !\n";
};
@ChinaXing
ChinaXing / wget-r-no-parent.sh
Last active December 20, 2015 22:59
retrieve recursively, no host, not parent
# -nH : no host
# -np : no parents
wget -r -nH -np \
https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/helloworld/src/main/webapp/
@ChinaXing
ChinaXing / mvn-download-jar.sh
Created August 23, 2013 02:43
use maven download jar
mvn dependency:get -DrepoUrl=http://repo1.maven.org/maven2/ \
-DgroupId=org.apache.poi \
-DartifactId=poi \
-Dversion=3.9 \
-Dtransitive=false
@ChinaXing
ChinaXing / hardisk-info.sh
Created August 28, 2013 02:27
# 查看j/检测硬盘信息
###################### 1. GSmartControl -- GSmartControl is a graphical user interface for smartctl
###################### 2. smartctl -- Control and Monitor Utility for SMART Disks
sudo smartctl -a /dev/sda
###################### 3. lsscsi
lsscsi
# output:
@ChinaXing
ChinaXing / ncurses-line.mkd
Created October 10, 2013 12:37
ncurses line urgly style solution -- ncurses 绘图发现边框线乱码解决方法

ncurse 在终端绘图的时候,发现边框的线条是qqkk之类的字母而非线条。

  • 解决方法:

>export NCURSES_NO_UTF8_ACS=1

@ChinaXing
ChinaXing / spring-in-action-spitter.mkd
Created October 13, 2013 10:33
<spring in action 3 edition> spitter application setup
@ChinaXing
ChinaXing / tmux-open-more.mkdown
Last active December 29, 2015 09:48
使用tmux同时打开多个ssh 链接在一个窗口
  • 如果没有运行tmux,则运行: tmux
  • 然后在tmux内部执行如下命令,会同时打开链接到两台机器的ssh会话,分屏为上下两 tmux new-window 'sudo -u admin ssh pesystem041124.cm4' ;
    split-window 'sudo -u admin ssh pesystem041147.cm4' ;
    select-pane -U
@ChinaXing
ChinaXing / sublime-indent-keybinding.markdown
Created November 28, 2013 13:57
sublime text 2 indent key bindings

Perference -> Key bindings Users -> add the followings :

[
  { "keys": ["ctrl+alt+l"], "command": "reindent" , "args": { "single_line": false } }
]
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Formatter;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
/**
-- 2014-03-28 @yunxing.cyx@
local nodegroup = nil
local siteList = {}
local tmsConfigureFile="/home/admin/confsvn/tms_update/tmsupdate.cfg"
ngx.req.read_body()
local args, err = ngx.req.get_post_args()
if not args then
ngx.say("error|failed to get post args: ", err)