To copy from the server
scp IP@USERNAME:REMOTEDIRECTORY LOCALDESTINATION
scp 172.0.0.1@ubuntu:~/filename.fileext ~/Download
/**
* If you're using a pem file
*/
scp -i ~/.ssh/filename.pem USERNAME@IP/DOMAIN:REMOTEDIRECTORY LOCALDESTINATION
| call pathogen#infect() | |
| filetype plugin on | |
| filetype plugin indent on | |
| filetype indent on | |
| " ============================================= | |
| set hidden | |
| " ============================================= | |
| set history=1000 " remember more commands and search history | |
| set undolevels=1000 " use many muchos levels of undo |
To copy from the server
scp IP@USERNAME:REMOTEDIRECTORY LOCALDESTINATION
scp 172.0.0.1@ubuntu:~/filename.fileext ~/Download
/**
* If you're using a pem file
*/
scp -i ~/.ssh/filename.pem USERNAME@IP/DOMAIN:REMOTEDIRECTORY LOCALDESTINATION
To compress using tar:
tar cjvf filename.tbz [files]
To uncompress:
tar xjvf filename.tbz
This is just a gist for taking note about the issue with capistrano when you upgrade to OS Sierra
The straight forward solution is to add all keys to ssh
ssh-add -A
But this doesn't persist after a reboot so we can include it to our .bash_profile like this
ssh-add -A 2>/dev/null;
| URL="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash" | |
| PROFILE="$HOME/.profile" | |
| echo "Downloading git-completion..." | |
| if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then | |
| echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1 | |
| fi |
This is just a personal gist for installing node and npm
Install nodejs from the repo / package manager of your choice
$ sudo apt-get install nodejsWhen you install node in ubuntu, it doesn't install as node rather it install as nodejs so we need to make a symbolic link from nodejs to node
$ sudo ln -s /usr/bin/nodejs /usr/bin/node