Skip to content

Instantly share code, notes, and snippets.

View ixiaohei's full-sized avatar

Kalvin ixiaohei

View GitHub Profile
@ixiaohei
ixiaohei / xrebel-usage.md
Created January 17, 2019 05:20
xrebel usage

Configuring XRebel Local in IntelliJ IDEA

  1. Open Run > Edit Configurations…
  2. Select the desired server from the left hand menu.
  3. Add the following line in the VM options field: -javaagent:[path/to/]xrebel.jar
  4. Press OK to save the changes and close the configuration window.

maven tips

encrypt master password

mvn --encrypt-master-password

settings-security.xml

<settingsSecurity>
	<master>{xxxxx}</master>
@ixiaohei
ixiaohei / pretty_json.md
Created November 29, 2018 01:27
pretty json

pretty json

# alias for pretty json
alias prettyjson='python3 -m json.tool'
@ixiaohei
ixiaohei / shell_proxy.md
Last active November 29, 2018 01:22
shell proxy

shell proxy

# alias for set proxy setting
alias setproxy='export all_proxy=socks5://127.0.0.1:1080;export no_proxy=localhost,127.0.0.1/8;echo "HTTP Proxy on";echo "all_proxy=$all_proxy";echo "no_proxy=$no_proxy";'

# alias for unset proxy setting
alias unsetproxy='unset all_proxy;echo "HTTP Proxy off";'

# alias for show proxy setting
alias showproxy='echo "proxy config for http";echo "all_proxy=$https_proxy";'
@ixiaohei
ixiaohei / sysbench.md
Last active September 25, 2018 05:58
sysbench usage

Syntax

sysbench [options]... [testname] [command] 

testname

  1. fileio
  2. cpu
  3. memory
  4. threads
  5. mutex
@ixiaohei
ixiaohei / keygen.md
Last active November 29, 2018 01:24
generate rsa private key

keygen

# use ssh-keygen
ssh-keygen -t rsa -b 4096 -C "comment"

# use openssl
openssl genrsa -out id_rsa.pem 4096

git skills

delete remote branch after git 1.7.0

git push origin --delete <branchName>

delete remote tag after git 1.7.0

git push origin —delete tag <tagName>