A Dummie’s Guide to Flashing Factory Firmware on Nexus 7 [2013]

This guide aims to teach people with basic computer skills to flash factory firmware image on Nexus 7 [2013] using Windows 7/10. It should apply to other modern stock Android devices.

Note: To prevent unauthorized access, unlocking the bootloader will delete all personal data on the device. Therefore, you must backup important data first before proceeding with the following procedure.
Continue reading A Dummie’s Guide to Flashing Factory Firmware on Nexus 7 [2013]

Keeping track of svn repositories using git

  • Clone an svn repository with entire history.
  • git svn clone --prefix=origin/ svn://svn.dd-wrt.com/DD-WRT

    Note: This can be very time-consuming on a large svn repository, esp. when the network connectivity is poor.

  • Clone an svn repository with recent history only.
  • git svn clone --prefix=origin/ -r 28015:HEAD svn://svn.dd-wrt.com/DD-WRT

  • When cloning fails on a large repository, keep fetching until it’s done.
  • cd DD-WRT
    while ! git svn fetch; do sleep 10; done

  • Fetch unfetched commits from the svn repository and rebase current work against it.
  • git svn rebase

  • Checkout an older svn revision.
  • git checkout `git svn find-rev r28015`

  • Return to the latest revision.
  • git checkout master

  • Remove untracked files in the current directory.
  • git clean -n
    git clean -f



  • 环境变量WGETRC指向的文件。
  • 如果设置了环境变量HOME,则配置文件为%HOME%\.wgetrc。
  • wget.exe所在目录的.wgetrc。
  • wget.exe所在目录的wget.ini。

Continue reading 给Windows中执行的wget设置证书包文件

Removing alternative Ubuntu flavors completely

When Ubuntu users want to try other Ubuntu flavors, e.g. Xubuntu and Lubuntu, they usually just install their meta packages:

$ sudo apt-get install xubuntu-desktop


$ sudo apt-get install lubuntu-desktop

apt-get can install their dependencies automatically. However, when users want to remove the alternative Ubuntu flavors completely, they are out of luck, because inter-dependencies among many packages can be rather complex, and apt tools simply does not automatically remove the dependencies of meta packages.
Continue reading Removing alternative Ubuntu flavors completely

Upgrading Ubuntu 12.04 to 14.04 on Pentium-M computers

Starting from 12.10, Ubuntu no longer offered non-PAE kernels. Some Pentium-M processors do not announce the PAE flag, although they actually have the PAE capability. When doing a release upgrade from 12.04, the Ubuntu release upgrade tool will complain of missing PAE feature on such computers and then abort after printing a link to the EnablingPAE document on the Ubuntu community help website. However, this document only covers fresh Ubuntu installation on such computers, leaving release upgrade users out in the cold.
Continue reading Upgrading Ubuntu 12.04 to 14.04 on Pentium-M computers

Ubuntu 14.04中PHP命令行找不到MIBS的提示信息

安装了php的Ubuntu 14.04服务器每半小时会执行一次/etc/cron.d/php5脚本,清理超时的php会话文件。由于找不到snmp mibs文件,php命令行解释器启动时会吐出一堆提示信息,这些信息会被Cron Daemon通过Email发送给root用户。日积月累这些无意义的邮件也会占用不少存储空间,并且会淹没有用的邮件。
Continue reading Ubuntu 14.04中PHP命令行找不到MIBS的提示信息