Sunday, July 8, 2012

Remote access ubuntu 11.10 from mac

http://mlepicki.com/2011/10/remote-vnc-login-to-ubuntu-11-10/



Remote VNC login to Ubuntu 11.10


Today I’ve installed Ubuntu 11.10 Oneiric Ocelot on my ASrock 100HT nettop. I’ve wanted to remotely control this box via VNC protocol.
My solution was x11vnc server, so I could share one one session between remote and physical access. I’ve found useful thread about x11vnc on Ubuntu 11.10 – I’ve just added some upstart magic to start x11vnc after lightdm.
First of all, I’ve installed x11vnc:
apt-get install x11vnc
Then, I’ve created /etc/init/x11vnc.conf file:
start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log
end script
After restart, x11vnc shoud listen on vnc startard port – 5900.
This script is of course based on upstart event mechanism. Lightdm emits login-session-start event (you can find it in lightdm.conf), and we start x11vnc when this event is emited – that’s first line of x11vnc.conf file.



Then, here is a youtube video showing step by step how to use vnc viewer to connect to the ubuntu machine.
http://www.youtube.com/watch?v=GY75u6TthH4

Sunday, June 24, 2012

Compile BLAT on x86_64 Ubuntu 10.04



http://defsci.blogspot.com/2011/02/compile-blat-on-x8664-ubuntu-1004.html

Compile BLAT on x86_64 Ubuntu 10.04

Recently I needed to compile BLAT for x86_64 on Ubuntu 10.04 server. The BLAT pre-compiled binaries for linux are 32-bit. Here is how you do it:



  1. apt-get install build-essential
  2. Download  BLAT source
  3. remove the -Werror compiler flag to treat warnings as errors
  4. mkdir -p ~/bin/x86_64
  5. export MACHTYPE=x86_64
  6. make
Step (3) above requires editing the /inc/common.mk file, line 17 goes from     


HG_WARN_ERR = -DJK_WARN -Wall -Werror


to 

HG_WARN_ERR = -DJK_WARN -Wall

Make places the executables into ~/bin/x86_64 directory. Either add this to $PATH or copy the files to /usr/local/bin

Saturday, June 9, 2012

book notes

Chimps can pick up human sign language, teach it to younger chimps, and create new combinations of the signs to refer to new objects. They have "cross-modal transfer of information", i.e. relating their perception of an object through touching with things they see later. They have a long span of memory. They have concept of self. They can make plans, making tools for eating termites much before they find a termite mound.

Sunday, May 27, 2012

Multiple page pdf in latex

 Use this package to include multiple pages from one pdf file in latex document.

http://ctan.org/pkg/pdfpages

买车记

周六和Iris一起到Sudeep家做午饭吃,I同学做了Shakshuka , 我做了第三鲜,S同学做了用lentil熬的糊糊。S同学多才多艺, 弹吉他,唱歌,钢琴等等,他还介绍我们看了好多印度舞蹈,据说共有9种民族舞蹈,北方占一种,主要动作就是穿着长裙不停旋转,南方占8种,有一种舞蹈看起来特喜庆,就是和着节奏用一种步伐蹦来蹦去,群体舞蹈还能摆出很多造型。当然我们印象中的传统印度舞蹈也在其中,一般一个女舞蹈演员,兰花指,大眼睛,用眼神摄人心魄的那种。还有一种特诡异的舞蹈,叫Kathakali  去看视频吧,我就不描述了。

在他家玩的差不多,我们就去了他家附近的一个咖啡店,叫paper or plastic cafe ,我在这儿喝到了迄今为止我喝过最好喝的拿铁。他家旁边是一家芭蕾舞蹈室,里面的男生女生都好有气质呀。

晚上回来开始上craigslist继续找车,找到一辆04年的corolla LE,才跑了五十多K,和I,E,望舒去看了车,觉得不错就直接带去修车厂检查了,去的是washington上的pep boys,虽然规模看起来还挺正规的,但是服务确实不够周到,检查的report特别简单就是几个方框,几个勾。Mechanic 谈起来还挺有经验的,总归车况很好,没什么毛病,最多就是再过个8千迈最好去换一下timing belt。 我还是不会降价,Lina给出9300最低价,比kbb报价低个700多刀,我觉得已经挺值了。 周二去交钱办手续,希望一切顺利。

Friday, May 18, 2012

R barplot with error bar

Go check this blog.
http://monkeysuncle.stanford.edu/?p=485

 
arrows(x,y+upper, x, y-lower, angle=90, code=3, length=length, ...)

Friday, April 27, 2012

12年4月

有意思,跟大树打电话的时候就能记起来很多故事,打开blog反而不知道从哪儿写起了。

好吧,从4月11号写起。那天,两个同学遇难了,最开始听到消息的时候还很兴奋,觉得有刺激的新闻了。当时只知道一个人是USC学生,然后说是两个亚裔,再然后说是两个中国学生。然后我就没有感觉了,一天里,出了消沉不知道该有什么情绪。晚上到tommy trojan聚会悼念死者,也只是莫名的难过,没掉过眼泪。

4月12号我生日,给家里打电话报平安,跟爸爸聊了挺久,他最后告诉我妈妈病了,还想满住病情不让我担心。还好我爸爸很冷静,该检查,联系医院之类的事情都已经安排妥当了。于是两天里,从想像失去自己孩子的父母的心情,到想像如果不幸最终发生我可能有什么心情。

4月18号,在shrine开更正式的追悼会,各种人讲话,校长和viterbi dean的讲话都很真诚,联系到他们自己当年求学的经历,怀有的理想和遇到的困难。接着是中国驻洛杉矶使馆代表讲话。原来流程单上写的是副总领事讲话,临时换成了总领事讲话。可以猜到那讲稿一定是秘书拟定的,不管是哪个官员站上去都可以直接念出来,自然感染力就大打折扣。最感人的是两个同学的好朋友上台回忆他们一起经历的点滴。女生的朋友是在USC才认识的同学,但短短一两个学期她的善良,勤奋,对朋友的关怀已经赢得了她朋友们的心,也感动了在场的与她并不相识的我们。男生的朋友是从本科开始就住一个寝室的兄弟,六七年里他的憨厚,对朋友间的支持鼓励,一个人在海外艰辛和奋斗,都是我们感同身受的。到这里我就哭得不行了,我不知道我还能做什么。