Style your notes with Markdown
- Titles: #This will be a title (##this is a sub-title)
- Bold ( + b): **this will be bold**
- Italics ( + i): *italics*
- Link: [click here](https://source-url.com)
- - this starts a list
- * sub-list item 1
- * sub-list item 2
- More
Keyboard shortcuts
- + s: Save your note
- + g: Save as Google Doc
- + p: Download as a PDF
- To publish as a blog, just use a #title at the top and then "publish" on the view-note screen
- Markdown InfoClose
edit
make private
The No-Questions-Asked way to set up a Codeship-ready DigitalOcean droplet with Ubuntu 16.04, Node, and Nginx with a Let's Encrypt certificate for HTTPS:
first, make a droplet and get in there
- login to digitalocean, click
create
, select new droplet
(be sure to add your ssh key), select ubuntu obviously, give it a name
- wait for the droplet to finish creating and ssh into that bad boy (
ssh root@ip.address
)
- i like to create an alias for this so i don't have to type/remember that stuff
- in ~/.bashrc (or ~/.zshrc if you use ohmyzshell like i do) add alias whateveralias="ssh root@ip.address" and then
source
that file
- now you can access the server by running
whateveralias
next, install node (the way that doesn't suck)
- run
sudo apt-get update
- run
sudo apt-get install build-essential libssl-dev
- run
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o install_nvm.sh
(swap v0.33.11 with the most recent version)
- run
bash install_nvm.sh
- this installs
node
and npm
as well as nvm
- it avoids using the linux
nodejs
namespace which makes swapping between OSX and Ubuntu less annoying
- run
source ~/.profile
(because some stuff got added there)
- run
nvm ls-remote
to see which versions of node you can download if you don't already know which one you want
- run
nvm install {VERSION}
to install, use, and set it as default
- test to make sure this works by running
npm install -g pm2
because you're gonna install pm2 eventually anyway
make symlinks from the nvm installs to where Codeship expects those binaries to be
- run
which node
, and use that filepath to run sudo ln -s {WHICH NODE FILEPATH} /usr/local/bin/node
- run
which npm
, and use that filepath to run sudo ln -s {WHICH NPM FILEPATH} /usr/local/bin/npm
- run
which pm2
, and use that filepath to run sudo ln -s {WHICH PM2 FILEPATH} /usr/local/bin/pm2
install nginx
- run
sudo apt-get update
(again)
- run
sudo apt-get install nginx
- run
vim /etc/nginx/sites-available/default
- find the existing
server_name
line and replace the underscore with your domain name
- run
sudo nginx -t
(test that nginx is configured correctly and you didn't fuck anything up attempting to change one dang line)
- run
sudo systemctl reload nginx
install certbot
- run
sudo add-apt-repository ppa:certbot/certbot
- run
sudo apt-get update
(cannot get enough of this shit)
- run
sudo apt-get install python-certbot-nginx
- run
sudo certbot --nginx -d {YOUR DOMAIN}
(add additional -d
tags for each sub/domain name the cert should be valid for)
DONE
This is the "no questions asked" version. Just do all this stuff and don't ask why. If you are compelled to ask why, here are the articles I compiled this info from (complete with actual explanations and alternatives/options):
instructions
pdf ( + p)  
gdoc ( + g)
save ( + s)