Keeping track of svn repositories using git

  • Clone an svn repository with entire history.
  • git svn clone --prefix=origin/ svn://

    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://

  • 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

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.
» Read more

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.
» Read more

Configuring IPsec IKEv1 with PSK and Xauth in openwrt 15.05

Although it’s not recommended for large scale IPsec deployments because the Pre-Shared Key must be shared among users, IKEv1 with PSK and Xauth is an easy-to-deploy option and is well supported by mobile devices powered by iOS and Android. Moreover, IKEv2 is not supported by the built-in VPN client in Android yet.

In this tutorial, we’ll install strongSwan 5.3.3 in openwrt 15.05, configure IKEv1 with PSK and Xauth, and finally setup the built-in VPN clients in Android and iOS so they can connect to it.


First of all, install necessary strongSwan packages in openwrt 15.05:

root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install strongswan-minimal strongswan-mod-xauth-generic

» Read more

WordPress插件Download Monitor国内打开速度慢的解决方法

WordPress插件Download Monitor可以管理文件下载。它能记录每次文件下载,统计下载次数,支持仅供网站会员下载的权限设置,并提供许多有用的短代码(shortcode)——功能丰富,却又比较简单易用,中文支持也较好。

国内用户访问安装了Download Monitor的WordPress网站会发现打开插件时速度很慢。这是由于Download Monitor调用了ajax.googleapis.com上的jquery-ui.css文件。
» Read more

1 2 3