Archive for the 'English' Category

I’m gonna die from heat exhaustion

I was trying to get my caffeine fix this afternoon at a Starbucks (well where else can you get half decent coffee in Nanjing…)

Me: I’d like a tall latte, please.
Starbucks: Hot or iced?
Me: Hot.
Starbucks: Wouldn’t it be too hot in this kind of weather?
Me: No, I prefer my coffee hot, thanks.
Starbucks: You sure you don’t want to try our iced coffee?
Me: No.
Starbucks: Please be careful, you might get heat exhaustion.
Me: JUST GIVE ME A HOT LATTE!
Starbucks: Do you want syrup with that?
Me: (WTF? Only iced coffee come with syrup) NO!
……

Streaming TV using VLC

In case I forget, following is the command I am using to stream from a Hauppauge PVR-250 card via HTTP… so that I can watch Hong Kong television from elsewhere, in case I get nostalgic or something:

spacehunt@ramen:~$ vlc -v --color pvr:/dev/video0:size=720x576:bitrate=3000000 --cr-average 1000 --sout '#transcode{vcodec=mp4v,acodec=vorbis,vb=180,ab=48,width=320,height=240,venc=ffmpeg{keyint=80,hurry-up,vt=500000},deinterlace}:standard{access=http,mux=ogg,dst=:56881}'

This says, take a 720×576 3Mbps MPEG2 stream from /dev/video0, deinterlace, transcode it using the XViD and Vorbis codecs, at 180kbps and 48kbps respectively, scale the resolution down to 320×240, and offer the result via HTTP port 56881 as an Ogg stream.

At first I tried Flumotion… but after trying for the whole morning, I gave up and remembered that VideoLAN was created exactly for this purpose. And it works flawlessly!

“Man-in-the-Middle” is an understatement

So we thought one way to defeat the bloody GFW is to just silently drop all RST flagged packets, which is very simple to do with Linux and iptables.

Continue reading ‘“Man-in-the-Middle” is an understatement’

The Legendary Great Firewall of China

Over the past month, our colleagues in mainland China have been complaining about not being able to connect to our email server, which is located in Hong Kong. Connecting to ports 25 (SMTP), 143 (IMAP4), 110 (POP3), 80 (HTTP), 443 (HTTPS) and 22 (ssh) often results in an immediate ‘Connection closed by foreign host.’

Well, not quite immediate… often some bits can be passed through, for example:

# telnet mail.sw-linux.com 143
Trying 202.153.106.243...
Connected to mail.sw-linux.com.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT IDLE ACL ACL2=UNION STARTTLS XMAGICTRASH] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.  See COPYING for distribution information.
Connection closed by foreign host.
# telnet mail.sw-linux.com 25
Trying 202.153.106.243...
Connected to 202.153.106.243.
Escape character is '^]'.
220 mail.sw-linux.com ESMTP Exim 3.35 #1 Fri, 09 Jun 2006 13:14:12 +0800
HELO nanjing
250 mail.sw-linux.com Hello nanjing [218.104.86.222]
MAIL FROM: xxxx@sw-linux.com
250 <xxxx @sw-linux.com> is syntactically correct
RCPT TO: xxxx@sw-linux.com
250 <xxxx @sw-linux.com> is syntactically correct
Connection closed by foreign host.

So what do we do? Let’s do a trace of the actual TCP/IP packets, courtesy of ethereal. Here’s what our Hong Kong server sees:

Capturing on eth0
  0.000000 218.104.86.222 -> 202.153.106.243 TCP 39758 > smtp [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=92231345 TSER=0 WS=6
  0.000811 202.153.106.243 -> 218.104.86.222 TCP smtp > 39758 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=15684968 TSER=92231345 WS=7
  0.102624 218.104.86.222 -> 202.153.106.243 TCP 39758 > smtp [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=92231453 TSER=15684968
  0.103506 218.104.86.222 -> 202.153.106.243 TCP 39758 > smtp [RST] Seq=1 Ack=1302803663 Win=0 Len=0
  0.190447 218.104.86.222 -> 202.153.106.243 TCP 39758 > smtp [RST] Seq=1 Ack=1 Win=0 Len=0
  0.231670 218.104.86.222 -> 202.153.106.243 TCP 39758 > smtp [RST] Seq=1 Ack=1 Win=0 Len=0

And from our Nanjing client:

Capturing on eth0
  0.000000 218.104.86.222 -> 202.153.106.243 TCP 39758 > smtp [SYN] Seq=0 Ack=0 Win=5840 Len=0 MSS=1460 TSV=92231345 TSER=0 WS=6
  0.107777 202.153.106.243 -> 218.104.86.222 TCP smtp > 39758 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=15684968 TSER=92231345 WS=7
  0.107813 218.104.86.222 -> 202.153.106.243 TCP 39758 > smtp [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=92231453 TSER=15684968
  0.234913 202.153.106.243 -> 218.104.86.222 TCP smtp > 39758 [RST] Seq=1 Ack=1 Win=0 Len=0
  0.269906 202.153.106.243 -> 218.104.86.222 TCP smtp > 39758 [RST] Seq=1 Ack=1 Win=0 Len=0

Now I’m no networking expert, but look at all these packets with the RST flag set… no wonder the connection drops. Even more strangely, look at the line I bolded; that Ack number seems to have came out of nowhere.

Man-in-the-middle, perhaps?

So this morning at around 11am, we opened another set of ports with non-standard port numbers for our mainland colleagues to use. It worked… while it lasts; even these ports were blocked by around 12:20pm ten minutes later.

What can we do?

Update Duh, this is very likely due to the enforcement of the new anti-spam legislation.

Deficit about the English Language

Is there any wonder why our secondary school system is running such a huge deficit that so many of them are facing closure? Even the toilets are so advanced, they can browse websites and give out answers to examinations. Such extravagance! The deficit must be rectified, as they say.

Update 07 May In response, someone rised a counter-petition.

Oh bloody hell you Brits…

I can’t believe “bloody hell” is still considered an expletive in this day and age. It hasn’t been for at least a decade, as evidenced by its widespread use in advertising:

People are not offended anyway.

Kawaii No More

Seems that RoadShow has replaced FirsTVision on NWFB buses. Not that I want those idiot boxes on buses, but when I’m forced to watch them at least give me something that is not irritating. If replacing it with RoadShow means no more of that faux-cute hostess Kawaii then I’m all for it.

Someone Doesn’t Like Google.cn

No, this isn’t really about Google.cn not having a legal ICP license. Someone just doesn’t like what they have done, especially in how they are telling users they are censored (emphasis mine):

But the China Business Times, a business newspaper with a sometimes nationalist slant, blasted Google for even telling people that links are censored. “Does a business operating in China need to constantly tell customers that it’s abiding by the laws of the land?” it said, adding that Google had “incited” a debate about censorship. The paper likened Google to “an uninvited guest” telling a dinner host “the dishes don’t suit his taste, but he’s willing to eat them as a show of respect to the host.”

Yes it’s all about face-giving. Go ahead and close it down I say. People still uses the uncensored Google.com instead anyway.

Wanted: Notebook

I’ve lost my notebook, probably while in Beijing (I just came back to Hong Kong last night). It is a Fujitsu LifeBook S-6130, serial number A031004453, WiFi MAC address 00:04:23:77:7E:1F, Ethernet MAC address 00:0B:5D:21:87:EE. It was bought on September 14, 2003. If anybody knows anything about it please either contact me directly or report it to the Hong Kong Police, thanks.

Update 19/02/2006 Added Ethernet MAC address

When Magic Kingdom Becomes Messy Kingdom

I wasn’t going to write about the chaos at Hong Kong Disneyland over the past few days, since there’s already so much excellent commentary about it.

But as I watched HK Disneyland director Bill Ernest cry…

… the first word that popped up in my mind was: insincere. Continue reading ‘When Magic Kingdom Becomes Messy Kingdom’




Bad Behavior has blocked 536 access attempts in the last 7 days.