- Migrations
- Seeders
- Scripts
Why migrations?
To revise existing structure of table To add new DB Table > To Delete existing Table
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>File Encryption/Decryption</title> | |
| </head> | |
| <body> | |
| <h1>File Encryption/Decryption</h1> |
| #!/bin/bash | |
| # Usage: clone_all_repos.sh [organization] <output directory> | |
| # Make sure you set GITHUB_TOKEN. export GITHUB_TOKEN=my_github_token" | |
| ORG=$1 | |
| PER_PAGE=100 | |
| GIT_OUTPUT_DIRECTORY=${2:-"/tmp/${ORG}_repos"} | |
| if [ -z "$GITHUB_TOKEN" ]; then |
| sudo pkill -f nginx & wait $! | |
| sudo systemctl start nginx |
| #!/bin/bash | |
| host=host | |
| uname=uname | |
| pass=pwd | |
| port=port | |
| db=db | |
| module.exports = { | |
| apps: [ | |
| { | |
| name: 'node-server', | |
| script: './bin/www', | |
| error_file: './logs/err.log', | |
| out_file: './logs/out.log', | |
| time: true, | |
| log_date_format: 'YYYY-MM-DD HH:mm Z', | |
| watch: false, |
| #vim mysqlbackupS3.sh | |
| #!/bin/bash | |
| DB_NAME="faprod" | |
| TSTAMP=$(date +"%d-%b-%Y-%H-%M-%S") | |
| S3BUCKET="s3://sfo2.digitaloceanspaces.com" | |
| #logging | |
| LOG_ROOT="./dump.log" | |
| #Dump of Mysql Database into S3\ | |
| echo "$(tput setaf 2)creating backup of database start at $TSTAMP" >> "$LOG_ROOT" |
| function getCounter() { | |
| let counter = 0; | |
| return function () { | |
| counter = 1; | |
| return function () { | |
| return counter = 2; | |
| } | |
| } | |
| } |
| #user nobody; | |
| worker_processes 1; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; |