Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:02
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?

Generate an SSH Key

You probably already have a public and private key. Check and make sure.

ls -a ~/.ssh | grep id

=> id_rsa

If you don't see these keys listed, generate them.

ssh-keygen -t rsa -C ""

Bash Detour

The next slide will make use of $EDITOR. It is a sort of "global" bash variable you can set to your favorite editor. Programs like Git make use of it when told to do so.

In .bash_profile

export EDITOR="subl -w"

Restart terminal

# Quick access to Bash Profile
alias bp="$EDITOR ~/.bash_profile"
# Quick access to homestead directory from terminal
alias homestead="cd /path/to/your/homestead/repo"
# Quick access to hosts file from terminal
alias hosts="$EDITOR /private/etc/hosts"
# Quick access to VM
alias vm="ssh vagrant@ -p 2222"

Adding a Site

  1. Clone my vagrant-test repo
  2. Edit Homestead.yaml
  3. Edit hosts file
  4. vagrant provision
  5. Hit the URL on port 8000 in your browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment