Skip to content

Instantly share code, notes, and snippets.

View kongliangzhong's full-sized avatar

kongliangzhong kongliangzhong

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kongliangzhong on github.
  • I am freemanzhong (https://keybase.io/freemanzhong) on keybase.
  • I have a public key ASA7plKEJNCcKZpaHfZUAJuuHRhL7hjyvhgOVzCMjolQawo

To claim this, I am signing this object:

/*
Copyright 2017 Loopring Project Ltd (Loopring Foundation).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
/*
Copyright 2017 Loopring Project Ltd (Loopring Foundation).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@kongliangzhong
kongliangzhong / parallel-computing.txt
Last active August 29, 2015 14:12
parallel-computing
### Docker ###
1) hello world:
sudo docker run ubuntu:14.04 /bin/echo "hello, world!"
2) interactive:
sudo docker run -t -i ubuntu:14.04 /bin/bash
3) daemonized hello world:
sudo docker run -d ubuntu:14.04 /bin/bash -c "while true; do echo hello world; sleep 1; done"
@kongliangzhong
kongliangzhong / J2EE-STUFF.txt
Last active December 19, 2015 04:48
J2EE stuff
J2EE STUFF
=== JMX ===
===========
=== MAVEN ===
1. use plugin short name:
add following content in ~/.m2/settings.xml:
<profile>
@kongliangzhong
kongliangzhong / miscellaneous
Last active December 15, 2015 17:49
miscellaneous
##### github related #####
---- emacs gist ----
git://github.com/defunkt/gist.el.git
# What's new in 1.0 ?
gist.el now maintains a local cache so as to not go to the gist server every now and then.
multi-files gist support (indicated by a '+' in the gist list)
improved gist-list buffer, based on tabulated-list.el (same codebase as package.el) New keybindings:
g : reload the gist list from server
e : edit current gist description
@kongliangzhong
kongliangzhong / db-stuff
Last active December 15, 2015 11:09
db stuff
############### mongodb: ################
1) not master and slaveok=false
在写多读少的应用中,使用Replica Sets来实现读写分离。通过在连接时指定或者在主库指定slaveOk,由Secondary来分担读的压力,Primary只承担写操作。
对于replica set 中的secondary 节点默认是不可读的,
[mongodb@rac4 bin]$ mongo 127.0.0.1:28019
MongoDB shell version: 2.0.1
connecting to: 127.0.0.1:28019/test
SECONDARY>
SECONDARY>
SECONDARY> db.yql.find()
@kongliangzhong
kongliangzhong / emacs-stuff
Last active December 15, 2015 11:09
emacs tips
#### EMACS TIPS ####
### cscope: ###
;; * Keybindings:
;;
;; All keybindings use the "C-c s" prefix, but are usable only while
;; editing a source file, or in the cscope results buffer:
;;
;; C-c s s Find symbol.
;; C-c s d Find global definition.
@kongliangzhong
kongliangzhong / linux-stuff
Last active December 15, 2015 11:09
linux-stuff
######### ubuntu linux #########
1) host file:
127.0.0.1 localhost
127.0.1.1 zhongkongliang-desktop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
@kongliangzhong
kongliangzhong / temp-text
Last active December 15, 2015 11:09
stractch text
java compile error: illegal character: \65279
save file without BOM can fix this problem.
in emacs, just open the file and run: M-x set-buffer-file-coding-system, and save the file.
thrift
1) download thrift
2) cd $thrift-home
3) ./configure --with-ruby=no