Skip to content

Instantly share code, notes, and snippets.

@etelford
Last active June 12, 2016 19:40
Show Gist options
  • Save etelford/de51d1a895a8894e2c2bc49e794b15c1 to your computer and use it in GitHub Desktop.
Save etelford/de51d1a895a8894e2c2bc49e794b15c1 to your computer and use it in GitHub Desktop.
Miscellaneous
  1. Get the deploy URL from Forge (or other PaaS)

  2. Create a dotfile in the root of your project, like .forge, and place the URL in that file

  3. Add the file from step 2 to your .gitignore

  4. Add the following to your .zshrc or .bashrc, etc.

    function deploy() { xargs curl -I < .forge & }

  5. source ~/.zshrc

  6. Now run deploy whenever you want to deploy your project

# Install apache2-utils
sudo apt-get install apache2-utils
# Create a basic auth user
sudo htpasswd -c /etc/nginx/.htpasswd myuser
# In one of your vhosts, add the following inside the location block:
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
# Reload nginx
nginx -s reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment