Joyber 发布的文章

crontab -e

0 5 * * *  /usr/bin/mysqldump -uxxxxxx -pxxxxxx --databases techan > /data/mysqlbackup/techan-`date +"%Y%m%d"`.sql && /usr/bin/zip /data/mysqlbackup/techan-`date +"%Y%m%d"`.zip /data/mysqlbackup/techan-`date +"%Y%m%d"`.sql

xxxxxx替换成你的数据库账号密码

-date +"%Y%m%d"的方法一定很笨,望指点!

wepy 插件 压缩

npm install wepy-plugin-filemin --save-dev
module.exports.plugins = {
  'filemin': {
    filter: /\.(json|wxml|xml)$/
  }
};


npm install wepy-compiler-less --save-dev
module.exports = {
  "compilers": {
    less: {
      "compress": true
    }
  }
};

npm install wepy-plugin-uglifyjs --save-dev

module.exports.plugins = {
  'uglifyjs': {
    filter: /\.js$/,
    config: {
    }
  },
};



npm install wepy-plugin-imagemin --save-dev

module.exports.plugins = {
  'imagemin': {
    filter: /\.(jpg|png|jpeg)$/,
    config: {
      'jpg': {
        quality: 80
      },
      'png': {
        quality: 80
      }
    }
  }
};

网上大多的例子是用 VMWare 安装,当我们用 virtualbox 安装的时候,在创建了虚拟机之后需要 执行以下命令,不然会卡在黑屏脚本那里

cd "C:\Program Files\Oracle\VirtualBox\"
.\VBoxManage.exe modifyvm MacOS10.11 --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
.\VBoxManage setextradata MacOS10.11 "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

cd "C:\Program Files\Oracle\VirtualBox\" 这个是进入你的虚拟机主程序的安装目录里,确认有 VBoxManage.exe 文件
MacOS10.11 改成 你的 虚拟机名称

原文链接:https://blog.csdn.net/chy555chy/article/details/51407410
感谢博主分享~