14
Jul 10

Regex for matching URLs blocked by GFW

The following regular expression can be used in browser plugins such as FoxyProxy and Proxy Switchy to match URLs of websites that are inaccessible in China. URLs that are matched can then be automatically redirected through a proxy.

https?://([^.]+\.)*(twitter|wordpress|blogspot|flickr|blogger|feedburner|youtube|dailymotion|bit)\.(com|net|ly)/.*

28
Jun 10

Mimms: Handy tool to rip MMS MP3 streams to file in Ubuntu

Today, I came across a handy command line tool called mimms that allows you to rip mms:// MP3 streams to an MP3 file on your computer for later listening. It is very easy to install and use.

Install mimms:

sudo apt-get install mimms

Sample usage:

mimms mms://iss-video.leeds.ac.uk/smlc/audio/eas/east3031/03Chopsticks.mp3
mimms mms://iss-video.leeds.ac.uk/smlc/audio/eas/east3031/03Chopsticks.mp3 filename-here.mp3

Of course you can find out more command line options by simply typing mimms –help

Happy ripping!


28
Jun 10

Enable Multimedia and DVD Playback in Ubuntu Lucid

Whilst Ubuntu comes with some basic multimedia support out of the box, there are a few simple steps that must be carried out in order for you to get the most out of your MP3, DVD and video collection.

First we need to add the Medibuntu repository for your version of Ubuntu:

sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list  --output-document=/etc/apt/sources.list.d/medibuntu.list

Next we add the Medibuntu keyring and refresh apt:

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

Next we need to install some multimedia packages and codecs:

sudo apt-get install non-free-codecs libdvdcss4 w32codecs vlc mplayer

Finally, run this script to enable encrypted DVD playback:

sudo /usr/share/doc/libdvdread4/install-css.sh

There we go, now sit back and relax!


23
Jun 10

Type Chinese Pinyin Accents in Ubuntu

Chinese learners or speakers may sometimes want to write out the romanisation for certain chinese characters complete with accents indicating the different tones. For example:

你好 [nǐhǎo]

This is possible using the Ibus input framework that comes with Ubuntu. The support for pinyin romanisation is provided in the ibus-m17n package. This must first be installed.

sudo apt-get install ibus-m17n

Once installed, restart Ibus and add the input method in the menu as in the screenshot below.
ibus-pinyin

You should now be able to activate the input method. Simply type the pinyin for a character preceded by the tone number (ranging from 1 to 4).