禁用 Firefox 中的 Hello, Pocket, Reader View 和 WebRTC

在about:config中找到并修改为以下值:

  • loop.enabled = false //disable Firefox Hello
  • browser.pocket.enabled = false //disable Pocket plugin
  • reader.parse-on-load.enabled = false //disable Reader View
  • media.peerconnection.enabled = false //disable WebRTC

P.S. 其实有个插件也可以禁用这些功能(Hello, Pocket, Reader View),下载地址为: https://addons.mozilla.org/en-us/firefox/addon/disable-hello-pocket-reader/

WebRTC一般用不到,建议禁用。

以上插件禁用后,Firefox的内存占用会显著减小。

转载自:http://yuv.me/disable-hello-pocket-reader-view-and-webrtc-in-firefox/

MySQL 数据库自动备份

首先创建一个 sh 脚本文件并保存,比如保存到 /usr/local/sbin/autoback_mysql.sh

给 sh 脚本文件可运行权限

创建一个计划任务,每天凌晨 1 点运行这个脚本

重启计划任务服务,让更改生效

 

Build lastest nginx and ngx_pagespeed in Ubuntu 14.04

以前写过一篇在 Ubuntu 12.04 LTS 上面部署 ngx_pagespeed 的文章,现在 Ubuntu LTS 版本已经更新为 14.04 了,ngx_pagespeed 部署的方法也有稍许改变,所以就更新一片文章,记录一下!

PageSpeed 是谷歌开发的一个服务器过滤模块,可以在服务器上自动将网页性能最佳实践应用到页面和相关资源,从而加速网站,减少页面加载时间。ngx_pagespeed 是 Nginx 的 PageSpeed 扩展模块,功能包括:

  • 图片优化: stripping meta-data, dynamic resizing, recompression
  • CSS & JavaScript 压缩、合并等
  • 小资源的内联
  • 推迟图片和 JS 的加载
  • HTML 重写
  • 延长缓存扩展

今天我们就把 Nginx 和 ngx_pagespeed 部署到 Ubuntu 服务器上。

继续阅读“Build lastest nginx and ngx_pagespeed in Ubuntu 14.04”

Using Hyper-V (Windows Phone Emulator) and VMware Workstation parallel.

Windows Phone 8 的模拟器是运行在 Hyper-V 平台上的,但是开启 Hyper-V 以后 VMware 虚拟机却无法使用了,虽然可以修改启动参数临时关闭 Hyper-V,但是每次都要重新启动,体验真的号差,因为这个原因我好久都没有开发和更新 Windows Phone 应用了。今天看到一个方法可以让 VMware 虚拟机运行在 Hyper-V 环境之下。

Since I’m working on some Windows Phone 8 Applications, I’ve installed Windows Phone 8 SDK which is shipped with the Windows Phone Emulator. The Emulator runs as Hyper-V virtual machine.
My (Linux)-Developing Servers are VMware machines. I’ve googled some hours to let both virtualizing systems run parallel (and booted up parallel the vms!).

Here’s a Step-by-Step List to let you run both together on the same host system:

You have not installed VMware and Hyper-V on the host yet

  1. Install VMware Workstation first.
  2. Install the Windows Phone SDK which enables the Hyper-V Role on your host
  3. Go to your Virtual Machine Storage place and open the *.vmx File
  4. Add the line: vmx.allowNested = "TRUE" 

You have already installed Hyper-V, but not VMware

  1. Deactive the Hyper-V Role
    1. open PowerShell or console and stop the Hyper-V role with:
    2. bcdedit /set hypervisorlaunchtype off
    3. Restart your computer
  2. Install VMware Workstation
  3. Activate Hyper-V role again
    1. run bcdedit /set hypervisorlaunchtype auto on console or PowerShell
    2. Restart your computer
  4. Add the line vmx.allowNested = "TRUE" to your VMware virtual machine *.vmx File

After this steps you can run the Windows Phone 8 Emulator and VMware virtual machines at the same time on the same host.

References