To monitor progress of an ongoing copy or mysql dump import you might try progress CLI tool. Track progress of commands like cp, mv, dd, tar, cat, rsync, grep, fgrep, egrep, cut, sort, md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, adb, gzip, gunzip, bzip2, bunzip2, xz, unxz, lzma, unlzma, 7z, 7za, zcat, bzcat, lzcat, split, gpg, etc.
This week while copying some of my dotfiles (due vim and zsh configuration) to a new remote host (dedicated server) of a new client I had to remove the private stuff (mainly aliases) from my .zshrc. Only now did the muse hit me to split the file and leverage the
source (import, require, include) functionality.
So I moved the host specific and private stuff from .zshrc and added the following 2 lines after
[[ -f .zshrc_priv ]] && source .zshrc_priv [[ -f .zshrc_host ]] && source .zshrc_host
After editing .zshrc and moving some lines into
.zshrc_host I also commented the files header to be reminded about their purpose in the future 😀
# .zshrc_priv # Sourced by .zshrc # Private settings due public version control alias vps='TERM=xterm-256color autossh -M 0 mike@vps' # host vps set in .ssh/config alias vps_tunnel='autossh -f -M 0 -T -N -R 10022:localhost:22 mike@vps'
# .zshrc_host # Sourced by .zshrc # Host specific settings export PATH="/usr/local/opt/node@6/bin:$PATH
Next I gonna separate some vim plugin specific code, too, to have a copyable (Plug & Play) config.
Works on Linux. For OSX see https://unix.stackexchange.com/a/285170/39470
According to docs https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors I ended up aliasing composer command:
alias composer="php -d memory_limit=-1 $(which composer)"
I switch between computers and sometimes when I’m switching I need to push an URL/prepare a window so found a solution with the following command:
mike@remotehost $ export DISPLAY=:0; nohup chromium --new-window https://github.com/deployphp/deployer#installation
Working on more than one computer requires some remote control and the command line is pretty elegant solution for me.
Example scripts are available at https://gist.github.com/mikaelz/b01b4cea83c9466fc57b
I also attached the code to the multimedia keys for the keyboard in .config/awesome/rc.lua