- Create droplet with Ubuntu 18.10
ssh root@[DROPLET IP ADDRESS]
- Get password from your email
- Change password on first login
adduser laravel
- Enter password and other information
usermod -aG sudo laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoObjectId = () => { | |
const timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, () => { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Setup firewall | |
echo "Setting up firewall..." | |
sudo ufw allow OpenSSH | |
sudo ufw enable | |
echo "Updating packages..." | |
## Update packages and Upgrade system | |
sudo apt-get update -y | |
## Install Linux, Nginx, MySQL, PHP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Rewrite whole history for a branch | |
import os | |
import subprocess | |
from pathlib import Path | |
class bcolors: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if osx, use reattach-to-user-namesapce | |
set-option -g default-command "reattach-to-user-namespace -l ${SHELL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-------------------------------------------------------# | |
#reattach-to-user-namespace must be installed | |
#-------------------------------------------------------# | |
#the following line refers to the file ~/.tmux-osx.conf | |
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf' | |
#-------------------------------------------------------# | |
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" vim-bootstrap b0a75e4 | |
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
endif | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"----------------VUNDLE-------------------" | |
set nocompatible " be iMproved, required | |
" Autogenerated filee from www.vim-bootstrap.com" | |
so ~/settings.vim | |
" Plugins | |
so ~/.vim/plugins.vim | |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5ac12c45bf84
I will be using the root user, but would suggest creating a new user
NewerOlder