sudo apt update
sudo apt install nginx
sudo apt install mysql-server
sudo mysql_secure_installation
sudo mysql -u root -p
## db/connect: create to the local database | |
.PHONY: db/connect | |
db/connect: | |
sqlite3 db.sqlite | |
## db/migrations/new name=$1: create a new migration | |
.PHONY: db/migrations/new | |
db/migrations/new: | |
go run -tags 'sqlite3' github.com/golang-migrate/migrate/v4/cmd/migrate@latest create -seq -ext=.sql -dir=./resources/migrations ${name} |
# Change these variables as necessary. | |
MAIN_PACKAGE_PATH := ./cmd/example | |
BINARY_NAME := example | |
# ==================================================================================== # | |
# HELPERS | |
# ==================================================================================== # | |
## help: print this help message | |
.PHONY: help |
mysqldump -u <username> -p <database> --no-tablespaces > <db-name>.sql | |
scp -i <ssh-key-path> username@IP:<db-name>.sql <local-directory> |
. - Any Character Except New Line | |
\d - Digit (0-9) | |
\D - Not a Digit (0-9) | |
\w - Word Character (a-z, A-Z, 0-9, _) | |
\W - Not a Word Character | |
\s - Whitespace (space, tab, newline) | |
\S - Not Whitespace (space, tab, newline) | |
# Anchors | |
\b - Word Boundary |
sudo su | |
apt update | |
apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
add-apt-repository "deb [arch=amd64,arm64] https://download.docker.com/linux/ubuntu focal stable" | |
apt-cache policy docker-ce | |
apt install docker-ce | |
systemctl status docker |
set nocompatible | |
:set number | |
:set nu | |
:set autoindent | |
:set tabstop=4 | |
:set shiftwidth=4 | |
:set smarttab | |
:set softtabstop=4 | |
:set mouse=a | |
set guifont=hack_nerd_font:h13 |