nc
is the command which runs netcat
, a simple Unix utility that reads and writes data across network connections, using the TCP or UDP protocol. It is a feature-rich network debugging and exploration tool
nc -l localhost:8080
sudo chown -R `whoami`:admin /usr/local/bin
scp ./config.yml streaming-util-2001.node.ad2.r1:<your path>
## create private key
openssl genrsa -out ~/.ssh/zhenlu_key.pem 2048
## change the privilage
chmod go-rwx ~/.ssh/zhenlu_key.pem
##
openssl rsa -pubout -in ~/.ssh/zhenlu_key.pem -out ~/.ssh/zhenlu_key_public.pem
- generate ssh key
ssh-keygen -t rsa -b 4096
- Ensure ssh-agent is enabled
eval "$(ssh-agent -s)"
- load the private key
ssh-add ~/.ssh/id_rsa
- copy to clipboard
pbcopy < ~/.ssh/id_rsa.pub
Add the following lines to ~/.bash_profile
# bash color
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
# export PS1='\[\e[0;33m\]\h:\[\e[0;32m\]\W \[\e[0;33m\]\u\$\[\e[0m\] '
export PS1="\[\e[0;33m\]\h:\[\e[0;32m\]\W\$(parse_git_branch) \[\e[0;33m\]\u\$\[\e[0m\] "
# git branch info
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
ps -e
will list all the running process.
or, use top -o cpu
will lively display the process info order by cpu usage.
open ~/Library/Mobile\ Documents/iCloud\~com\~apple\~iBooks/Documents