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
import 'nprogress/nprogress.css' | |
import NProgress from 'nprogress' | |
import axios from 'axios' | |
const calculatePercentage = (loaded, total) => (Math.floor(loaded * 1.0) / total) | |
const setupUpdateProgress = () => { | |
axios.defaults.onDownloadProgress = e => { | |
const percentage = calculatePercentage(e.loaded, e.total) |
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
cat > /etc/nginx/conf.d/gzip.conf << EOF | |
gzip_comp_level 5; | |
gzip_min_length 256; | |
gzip_proxied any; | |
gzip_vary on; | |
gzip_types | |
application/atom+xml | |
application/javascript | |
application/json |
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
#!/bin/bash | |
USAGE="$0 [-u <user> -p <password> -h <host> -P <PORT> -d <database> -D <destination/directory/without/trailing/slash>]" | |
DESTINATION=`pwd` | |
USER=root | |
PASS=root | |
HOST=localhost | |
PORT=3306 | |
# SPECIFY HOW LONG TO RETAIN BACKUPS |
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
SET GLOBAL sql_mode = ''; |
NewerOlder