This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g allow-rename off | |
set-option -g history-limit 10000 | |
set-option -g mouse on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo easy_install pip | |
cat ~/.pip/pip.conf | |
[global] | |
index-url = https://mirrors.aliyun.com/pypi/simple | |
[install] | |
trusted-host=mirrors.aliyun.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```bash | |
brew install automake pkg-config libevent | |
git clone https://github.com/tmux/tmux.git | |
cd tmux | |
sh autogen.sh | |
./configure --prefix=$HOME/.local | |
make -j8 && make install | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```bash | |
brew install automake pkg-config libevent | |
git clone https://github.com/tmux/tmux.git | |
cd tmux | |
sh autogen.sh | |
./configure --prefix=$HOME/.local | |
make -j8 && make install | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install yum-utils | |
# use --resolve to download dependencies. | |
yumdownloader --destdir ./rpms --resolve <package> | |
# on other machine | |
cd rpms | |
yum --disablerepo=* localinstall *.rpm -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
set timeout 20 | |
set cmd [lrange $argv 1 end] | |
set password [lindex $argv 0] | |
eval spawn $cmd | |
expect "assword:" | |
send "$password\r"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spinner() { | |
local spin="\\|/-" | |
local i=0 | |
tput civis | |
while kill -0 "$1" 2>/dev/null; do | |
i=$(( (i+1) %4 )) | |
printf "\b%s" "${spin:$i:1}" | |
sleep 0.07 | |
done | |
tput cnorm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" set F5 for compile and run c/cpp/python | |
"map <C-F5> : call CompileRunC()<CR> | |
map <F5> : call CompileRunCpp()<CR> | |
"map <F5>: call DebugCpp()<CR> | |
"map <F6> : call RunPython()<CR> | |
map <F6> : call RunShell()<CR> | |
func! CompileRunC() | |
exec "w" | |
exec "!gcc -std=c++11 -g -lboost_program_options -lpthread -lboost_system -lboost_filesystem % -o %<" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# STL GDB evaluators/views/utilities - 1.03 | |
# | |
# The new GDB commands: | |
# are entirely non instrumental | |
# do not depend on any "inline"(s) - e.g. size(), [], etc | |
# are extremely tolerant to debugger settings | |
# | |
# This file should be "included" in .gdbinit as following: | |
# source stl-views.gdb or just paste it into your .gdbinit file |