Bash scripts

sscp::Deploying and downloading files to VM via SSH

Useful script for working with virtual machines, like deploying and downloading big amount of files.
https://gist.github.com/andkirby/cbeaad9fbedcbce6cf20bf5ba5467e59
It was tested in GitBash for Windows v2.9.

# GitBash Windows
curl -Ls https://gist.github.com/andkirby/cbeaad9fbedcbce6cf20bf5ba5467e59/raw/sscp -o /usr/bin/sscp

Please use SSH keys for connection, to avoid typing passwords every time.
In Windows, you just need to create configuration file for SSH.

#c:\Users\your.username\.ssh\config
Host my-hostname IdentityFile /d/vms/vagrant-dir/.vagrant/machines/default/virtualbox/private_key

xd_swi::XDebug status switcher

The script can quickly switch status of XDebug for PHP.
https://gist.github.com/andkirby/8db337ea6495951e6f952005ce7c170b
Tested on CentOS 6.x, 7.x, and  GitBash for Windows v2.9.

# Unix
curl -Ls https://gist.github.com/andkirby/8db337ea6495951e6f952005ce7c170b/raw/.xd_swi -o /usr/local/bin/xd_swi \
&& chmod +x /usr/local/bin/xd_swi

# GitBash Windows
curl -Ls https://gist.github.com/andkirby/8db337ea6495951e6f952005ce7c170b/raw/.xd_swi -o /usr/bin/xd_swi \


c:\> node & npm::Installer for Windows GitBash

Install node latest NodeJS and Npm on Windows (Git Bash).
https://gist.github.com/andkirby/3f65c5a6499739c842e25fb7f6d5e682
It was tested in GitBash for Windows v2.9.

# GitBash Windows
curl -Ls https://gist.github.com/andkirby/3f65c5a6499739c842e25fb7f6d5e682/raw/node-npm-git-bash-win.sh | bash



No comments: