2012-07-30

南游记(五)-- 布里斯班

28号早上,坐了一个小时的飞机从悉尼到布里斯班了,查看了一下airtrain 和door to door,最终决定乘坐train,价钱几乎一样,一个15,一个16。但是由于第二天还要坐火车去黄金海岸,所以决定还是坐火车了。


相比悉尼,布里斯班给人的感觉是破破烂烂的,有点象北欧的难民区一样,不过还没有到市中心,还是观望一下吧。天气是寅阴沉沉的,自己一个人,完全没有在悉尼时开心的感觉。看来现在真的是岁数大了。喜欢热闹有人的感觉。





火车直接开到Roma street 下车步行5分钟到酒店,放下行李,简单询问接待员情况后,直接步行到皇后大道乘车545 到line pine。
酒店
去市中心途中

中心广场


很气派吧,猜猜是啥!

因为在澳洲,只有Queensland is legal to cuddling tie koala, so this is a must go place. Queensland 的车票和瑞典一样是一个小时之内连乘的,看通告,之前还有daily的可惜没有赶上。5块4澳元直接杀奔考拉园。


line pine 有着各种有袋类动物,所以不止最有名的袋鼠和考拉,还有塔斯马尼亚恶魔,鸭嘴兽等等。一上车,后面一群台湾mm在叽叽喳喳的数落八卦着什么,由于要集中注意力观看并不美丽的brisbane风景就没有注意她们,大概是由于是热带城市的原因,布里斯班的防务设施都显得陈旧杂乱。就这样一路扫兴的到了line pine。一下车,叽叽喳喳们找上门要帮忙合影,拿起相机对准她们才发现是四个大美女。(虽然说有3个是画出来的吧,不过不得不承认台湾美美对打扮的要求十分之高。)进入园后第,领到一个时间表,有各种表演项目,最近的一个是牧羊犬示范,一项喜欢gg的我自然不能放过。(是狗狗哦,本人可不是玻璃;) )。 牧羊犬异常听话,主人一个动作,一个口哨他们都可以做到心领神会,(比那些不知所谓的猫咪来说不知道强了多少)。牧羊大概两个规则,主人往哪里走就往哪里赶,主人的鞭子往哪里挥,就像哪里赶。

看过精彩的牧羊表演之后就去看袋鼠,当然院子里面还有各种澳洲家禽,牲畜,比如鸡,羊,八戒。在八戒的家门口还有我很丑而且我咬人的警告牌。这年头,八戒伤不起呀。继续向前,看到墙边躺着一坨坨黄色的,原以为是什么山羊之类的,走进发现原来是懒懒的有袋大鼠。动物园是有袋鼠粮卖的,2澳币一小袋,怀着对袋鼠们无比的歉意,决定喂上一喂(因为爱踢足球的原因,曾经买过业界认为最舒服的袋鼠皮球鞋。)这里的袋鼠有黄,红两个品种,其中黄色的偏多。喂之前先看看使用说明书,要领,是不能把手放的比它的身高高,不然它们会用手去够,容易抓伤,大胆一试,感觉是在喂狗狗一样,他们会很温柔的在手心舔食,不会有危险,色心渐起,决定上手摸一摸,发现袋袋们异常配合,没有丝毫"害羞"的感觉。



喂过袋鼠后看了各种飞禽的表演,比如猎鹰,猫头鹰,还有很多认不出的鸟,大家看视频吧。

最后也是此次旅行的重头戏--考拉。这里的考拉园有很多,在每个园中都有很多想竹子一样的植物,还有人造的架子,一个个灰茸茸的肥考拉就懒在上面。虽然考拉看上去圆嘟嘟的,事实上它们并不肥(认了吧,体型不好,外加平时作息习惯不好,不是睡就是吃)。所以考拉很怕狗,小小的一点咬伤,对于考拉来说都有可能致命。考拉和袋鼠一样都曾经遭受过认为的猎杀,加之人类对它们栖息环境的影响,数量都曾经大量减少,现在,随着人们对它们的保护,数量有所回升,不过还是有很多有袋类物种濒临灭绝。有的已经永远和地球说再见了。


既然来了,自然要抱一抱这些可爱的小家伙,16澳元一张照片,然后把自己的相机调到每秒10张让摄影大妈帮忙按一下快门(^_-)。大妈汗了。园中又看了看其他的澳洲动物,比如远远小于想像的鸭嘴兽,园中肆意游荡的蜥蜴和山鸡,下午4点准备返回市内。




市区的皇后大道应该是最繁华的地区,晚上5,6点街上的人超多,看到一个非常宏伟的建筑却没有比标明是什么,决定去问个究竟,答案是casino。








觉得肚中空乏,突然意识到一天还没有吃东西。转了大半个市中心(这里的城市和欧洲一样,很小)发现这里有很多韩国人,其次是日本人。最终在一家日餐馆就餐。顺便去了一下朋友极力推荐的Hungary jack 最终发现菜单和burger king 一模一样。原来是马甲呀!天黑,简单散布后回酒店,拿了钥匙一进房间惊了,12层的套房河景 ,出入两间,king size 大床外加厨房。

从酒店房间看布里斯班

十分适合家庭居住。洗个热水澡,准备明天去黄金海岸。

2012-07-10

vim

Window:

Switch window:

:sp
:vsp

Ctrl+w Ctrl+w or Ctro+w navigation keys

widnow move
Ctrl + W + R   - To rotate windows up/left.
Ctrl + W + r   - To rotate windows down/right.

You can use the Ctrl + W + navigation keys to change windows' position too
Ctrl + W L   - Move the current window to the "far right"
Ctrl + W H   - Move the current window to the "far left"
Ctrl + W J   - Move the current window to the "very top"
Ctrl + W K   - Move the current window to the "very bottom"

window resize
The easiest way:
Ctrl + w [n] [-|+|<|>] 
Ctrl + w = 


Buffer:
:ls - to list all file buffer
:ls! - to list all buffer
:b # - to move to the #th buffer
:bn - open next buffer
:bp - open previous buffer
Ctr+o and Ctr+p

Explore:
:E
:Ve
in explore, press:
t - to open in new tab
v - to open in vertial split window

2012-04-14

My Dell Inspiron530

Just got a free Dell Inspiron530, with nice specification. I plan to use it us my working desktop. So, start to install xubuntu on it. As I have already have a live-usb, the usb will be used as the installation source. But I get a problem. We the system try to boot from my USB drive, it complain "boot error". This is really strange as I use to use my USB driver to install another two computer. After googling on the internet, I figure out the problem is from Dell's awful BIOS. The BIOS require USB drive to be exactly formated as it wanted, otherwise it will treat the USB drive as USB-zip0. The only software that I find be able to formate my USB drive to follow Dell's requirement is HP USB storage format tool.
After format my USB drive by using HP USB tool, this computer successfully recognized USB drive as USB-HDD and it did but into xubuntu installation interface. But I got another problem. The installation program cannot read the partition. The reason is, this old computer's hard disk used to be used to build a raid. So, there is old raid information on it. After remove the raid information by using 
"dmraid -E -r /dev/sda".
 xubuntu installation program successfully recognized all my existed partition.

南游记(四)-- 悉尼Day3

27日 悉尼 大晴天 hunter valley
27日早上一大早在酒店等车,另外等33同学。昨天头痛的她不知道今天能不能继续陪游。在酒店打个电话发现还生龙活虎,ok那今天的旅行是没有问题了。七点一刻老同学准时出现,估计是由于今天天气特别好的原因,老同学还稍做打扮。坐车,市区挨个酒店接完之后,八点整我们准时出发去猎人谷,开始品酒之旅。这时,看看车上的散拼客,老同学说我们报了一个老人团。一个半小时后,在中途的小镇停靠休息。看到很多人在一件小房子里面吃东西,我们就去品尝了一下,心想鬼老的团还真是不错,提供这么多东西。吃了一会儿后,一个工作人指出他们是当地了解土著人的团和我们不是一个团,汗呐,这下变成骗吃骗喝的了。老同学解释之后,工作人员高兴的说那边还有很多,想吃啥随便拿。澳洲村里人太好客了。半个小时后,我们到了今天的第一站,McWillian 酒厂,这里是1940年左右开始建成的葡萄园,一开始生产餐桌酒,不过销量不好,慢慢的转型做澳洲稍高端了,葡萄园主要有两种葡萄,白酒的和红酒的,红酒的主要是希拉。这里大部分是极其采摘,说是采摘,其实就是一通乱摇,把各种各样的葡萄都摇下来酿酒,不过偌大的葡萄园,两个人加机器就够了。人工的就费事很多,要大早晨,一点一点的找合适的采摘,所以叫精选葡萄酒。另外澳洲的葡萄酒都是加发酵粉催化出来的,3个星期左右就出栏了。按照解说人员的解释,酿酒就是控制好发酵,温度,氧化。不然很有可能酿出来的是醋。听了酿酒的常识,品尝了各种美酒。加上一顿牛排餐。开始觉得有点晕晕的感觉。餐后,司机把我们拉到另外一家酒厂,lindmans,看当地人的反应,似乎这家更加有名。继续平常各种美酒,冒泡的希拉,感觉像是香槟,还有各种甜酒。最终我们醉醺醺的准备前往最后一站。无一例外,仍然是吃吃喝喝。结束后,返回悉尼市,直奔想了很久的回转寿司店,一进店,发现这里的寿司种类异常的多,完全不是北欧可以比的。等地一个寿司进嘴,彻底震撼了。那口感实在是一绝,非常有yam yam 感。而鳗鱼寿司最终变成了我的最爱。由于吃吃喝喝了一天,实在是没有办法品尝更多。只能尽量找从来没有吃过的品尝。



 悉尼的城市一角
 路边的小亭子

 搭乘的巴士车
 途中小镇的警察局,在这里大家简单的歇歇脚。
Hunter Valley
 中午的时候,我们达到了McWillam 酒庄,在这里酒庄的工作人员简单的介绍了酒庄的历史,酿酒的工序流程。

McWillam 酒窖

中午在酒庄就餐
在吃喝一顿之后,我们前往第二个酒庄:lindemans




傍晚返回悉尼,路过有名的The Star (都城)
在悉尼的第三天,也是本次悉尼游的最后一天,晚餐就在市中心的回转寿司店。在这里吃到了我目前为止品尝过的最美味的寿司。还有本吃货的最爱,鳗鱼寿司。回转寿司店根据盘子的颜色不同,有不同的价钱。基本上是从2澳元到6澳元不等。吃完之后,自己的面前会有厚厚的一叠盘子。





2012-04-03

WR1043ND to OpenWRT

Complie personal build

First, I downloaded OpenWRT from official website and flushed it, it works pretty good. But there is a very important problem. OpenWRT does not support channel 12 and 13. These two channels are not allowed to be used in US. But, I am living in EU, it is no sense to waste two channels if there are more then 10 neighbors' wireless networks around you. As OpenWRT has an agreement with Atheros, they cannot provide pre-build bin file which support channel 12 and 13. So, I have to build my own one to let OpenWRT respect user's setting. On ubuntu/debian system install:
  bash$ sudo apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk flex quilt git-core
Create a folder to hold source files for compile:
  bash$ mkdir ~/OpenWRT
  bash$ cd OpenWRT
  bash$ svn co svn://svn.openwrt.org/openwrt/trunk/
  bash$ cd trunk
The respository can be found at https://dev.openwrt.org/wiki/GetSource. Option packages can be enabled in feeds.conf.default file which located at the root folder of the repository. Next, in order to update feeds after changing the sources, we need to run:
  bash$ scripts/feeds update -a
  bash$ scripts/feeds install -a

Then "scrips/feeds search xxx" can be used to search package and "scripts/feeds install xxx" can be used to install packages. The dependency will automatically be resolved by feed script.

To build rom for my router. I need to specify the setting:
  bash$ menuconfig
    Target System: Atheros AR71xx/AR7240/AR913X
    Target Profile: TP-LINK TL-WR1043ND v1
    Check the setting in Kernel modules-->Wireless Drivers-->kmod-ath-->configuration
  $make -j 3

First Login

After compile, file with name "openwrt-ar71xx-tl-wr1043nd-v1-squashfs-factory.bin" can be found in output folder. This is the file that need to flash on a factory router. Another one with name "openwrt-ar71xx-tl-wr1043nd-v1-squashfs-sysupgrade.bin" can be used to update router which already installed OpenWRT. The default status of a freshly instelled router is:
  • The internal interface lan and the wireless interface/interfaces wlan0 / wlan1 are bridged together to br-lan
  • wifi is disabled
  • the IP address of the internal interface/bridge of the OpenWrt-device is 192.168.1.1/24
  • dnsmasq is running; it allocates IP addresses in the range of 192.168.1.100 to .250 on the internal interface to connected hosts
  • dropbear does not accept connections
  • telnet daemon is running on standard port (23)
The first thing we need to do is to telnet to it and change the password. run command:
telnet 192.168.1.1
to connect to the router and:
root@openwrt:~$ passwd
Changing password for root
New password:
Retype password:
Password for root changed by root
root@openwrt:~$
after you set a password the telnet daemon will be disabled, type exit into the prompt.
without reboot, SSH is now available; so is HTTPS if the WebUI (LuCI) is installed with it's TLS-modules.
login again with ssh root@192.168.1.1

Install luci

Luci is a very easy to use GUI for OpenWRT. It can be installed from repository (other method). OpenWRT repository management system is similar to debian's dpkg, instead, it named opkg. As apt-get, the first thing to do is to retrieve the current list of available packages in the repository:
  opkg update
For a full LuCi installation without HTTPS suport:
  opkg install luci

Start LuCi(uHTTPd) server

Enable automatic start at boot and manually start the LuCi server with commands:
  
  /etc/init.d/uhttpd enable
  /etc/init.d/uhttpd start
After this, it is able to connect the router with web browser at http://192.168.1.1
uHTTPd can be configured, but it is not required.

Install required modules for WiFi

    opkg update
    opkg install kmod-ath9k wpad-mini
Wifi will be ready after reboot.

Install USB/HDD

To enable mass storage capability:

  root@OpenWrt:~# opkg install kmod-usb-storage
After that we can enable file system that we want to use. For example, we want to enable ext4 support:
  root@OpenWrt:~# opkg install kmod-fs-ext4
Now we can use blkid to list all avaiable disk. In my case, I got:
  root@OpenWrt:~# blkid
  /dev/sda1: UUID="0737-3F5F"
Ref:
  • http://knowhow.bart.prokop.name/install/openwrt/wr1043nd
  • http://blog.philippklaus.de/2011/04/openwrt-on-a-tp-link-tl-wr1043nd-gigabit-router

Setup DNS and DHCP

ref: http://wiki.openwrt.org/doc/uci/dhcp

Setup DDNS with ddns-scripts

Web interface can be used. But, in order to save more space, I decide to go to scripts. Check: http://wiki.openwrt.org/doc/howto/ddns.client

Install ddns-scripts package

  root@OpenWrt:~# opkg install ddns-scripts
The configuration is stored in /etc/config/ddns. At least one section has to be enabled to active ddns Enable the setting:
  root@OpenWrt:~# ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface

WOL

I use my android phone to send wol message to my nas server. The name of the application is "Wol Wake On Lan Wan". I have already set up WOL function on my NAS. Here, we going to focus on Wol configuration on openwrt. 1. Add forwarding setting in firewall (/etc/config/firewall):
  config 'redirect'
    option '_name' 'wol' #name of this redirect 
    option 'src' 'wan' # message from internet
    option 'proto' 'udp' # wol package is udp
    option 'src_dport' '9' # wol port is set to 9
    option 'dest_ip' '192.168.0.2' # IP of NAS server
    option 'dest_port' '9'
    option 'target' 'DNAT' # I am using dynamic NAT
    option 'dest' 'lan' # of cause, my NAS is in my LAN
2. The next step is to add a binding between IP address and MAC address. Following ip command should be used to ask OpenWRT to remember ARP setting unless manual change or reboot. In order to keep this setting after rebooting. We need to add it to /etc/rc.local. So it will be invoked each time the router rebooted.
 
  ip neigh add 192.168.0.2 lladdr 1c:6f:65:b7:fe:b1 nud permanent dev br-lan
This command bind ip address 192.168.0.2 to MAC address 1c:6f:65:b7:fe:b1 and this is a permanent mapping to interface br-lan. If ip command is not installed yet. Run:
 opkg update
  opkg install ip
This command should be run manually, if we don't want to reboot the router. After this, command arp -a can be used to verify the mapping. Now the WOW should be ready.