Replace [your key] with your key ID
To obtain your key ID
gpg --list-secret-keys --keyid-format LONG
Which returns something like
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
type Listener<T extends Array<any>> = (...args: T) => void; | |
class EventEmitter<EventMap extends Record<string, Array<any>>> { | |
private listeners: { [K in keyof EventMap]?: Set<Listener<EventMap[K]>>} = {}; | |
private getListeners<K extends keyof EventMap>(eventName: K): Set<Listener<EventMap[K]>> { | |
return this.listeners[eventName] ?? new Set(); | |
} | |
on<K extends keyof EventMap>(eventName: K, listener: Listener<EventMap[K]>) { |
# Backup | |
docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
# Restore | |
cat your_dump.sql | docker exec -i your-db-container psql -U postgres |
name: ci-cd pipeline deploy to prod | |
on: | |
push: | |
branches: [ feature/github-action ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Github action IP |
Upload files to Google Drive using Google Apps Script Web Apps and save records in Google Sheets. |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
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/5424d440c63a
I will be using the root user, but would suggest creating a new user
http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip