跳转至

首页

追逐梦想的医生

早晨醒来,口干舌燥,电话留言里有个熟悉的声音在哭诉,那是医生。作为挚友,他们在大学分开后几十年很少联系,偶尔在网上扯扯淡,很多好朋友都是如此。 医生说小玲快不行了,能从他的声音里听出他们爱的深沉。他这次请了几个好朋友到家里,因为小玲说要在走之前和大家再说说心里话。 翌日中午,赶到医生家,门口已经停了一辆福特小卡和宾利,应该是李然和老顾。进去过后,发现医生在洗菜,小玲和女儿还有他的两个叔叔在电视机前聊天 ,看到他进来,小玲说赶紧过来,说到毕业后参军的故事了。 二十年前的故事,即使不想说,可面对一个即将离去的人,能有什么开不了口么。 吃完饭后,他们驱车前往老顾在乡下的农庄,小玲告诉医生她走后一定要再找个女人好好去爱,要不这么好的男人浪费了,谈笑之余,也觉得有理。李然毕业后便带着家里的遗产去了英国,在那边结了两次婚,现在这个也几近边缘;老顾初中毕业后便跟人去GA-9-O星球殖民,多年滚打后,如今也算小有名气,但是对爱情什么的从不感冒;而他在各星系间穿梭了半生,影影绰绰爱上过几个女人,可结果总是以分手告终;唯有医生,毕业后便与小玲结了婚,在研究所干了几年后就出来在当地开了家私人诊所,并打算就这样过完一生。 晚饭后,小玲带着女儿回房间。医生说他做了一些实验,从十年前小玲被确诊便开始。医生领他们三个来到地下室,指着其中一个暗红色培养皿说,这就是十年的心血,小玲也同意了,下个星期就可以开始。医生是个保守的人,也是个很有原则的人,小玲相信他。 半年后,他从GA-1-I回来,去了趟医生家,敲了半天没人回应,从后门的窗户望进去,他瞬间脑袋空了。 他一脸惘然坐回车里,按动指纹开关,驱车向西。

新世界 序章 流白

散开的云烟,看不透倩人影 缘分至今,可有人来序兰亭 胡琴送曲隔江千万里,锦帛写乱了马蹄

《想当厨子的生物学家是个好黑客》观感

流白。 买这本书的初衷是希望从中获得一些技能或者方法,以及了解现代DIY生物的发展,可看完后不免有些失望 。 译者水平有待提高,编辑内容稍微逊色。 可也不是没收获,至少知道了世界上还有一群人再为人类科技文明在默默奉献,尽管来自外界的阻力很大;也了解了如何打开生物DIY的大门(在设备方面); 阻力也可能是好的,鉴于伦理和道德因素,以及技术垄断,对策才会涌现,当然,对一些人来说这也是为什么它如此有趣。

Using Gpu in RaspberryPi

We had a wiki here. http://elinux.org/RPi_Xorg_rpi_Driver#Design

And vc sdk on github. It's also in /opt/vc. https://github.com/raspberrypi

X using gpu. https://github.com/simonjhall/fbdev_exa

Playback accelerating. http://wiki.matthiasbock.net/index.php/Hardware-accelerated_video_playback_on_the_Raspberry_Pi

Compile gstreamer{*} in Pi http://permalink.gmane.org/gmane.comp.video.gstreamer.devel/43011

Using wayland instead of X Here's the build instruction http://wayland.freedesktop.org/raspberrypi.html For recently PI_DEBIAN img, we should just

apt-get install weston weston-dev

Using xwayland to run X application in wayland..

Notes: 1. If you're going to compile cairo using egl, you shall meet a problem like undeclared 'None', just DEFINE one as 0L. 2. Using soft link rather than copying one when library is missing.

Waiting4Test Tuning Rasbian Speedup CPU: raspi-config arm_freq=900 I always use this hack and my rpi run without problem Change scheduler/elevator at boot time: we use more responsive/less disk io usage scheduler: modify the /boot/cmdline.txt

dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=120,data=writeback elevator=deadline rootwait quiet

Tuning sysctl.conf: as manual say, sysctl.conf is the “Configuration file for setting system variables”... well there are lot of variables you can put inside this file and for everyone we can write a book. Our goal is to gain more speed and tell our system to use less io/ram. Let’s put in the /etc/sysctl.conf:

vm.dirty_background_ratio = 20 vm.dirty_expire_centisecs = 0 vm.dirty_ratio = 80 vm.dirty_writeback_centisecs = 1200 vm.overcommit_ratio = 2 vm.laptop_mode = 5 vm.swappiness = 10

Tuning SDCard: Quite hard to understand, but changing the partition alignment of the SDCard can highly improve the write speed of our sdcard. Basically we have to align the first partition to the erase block size of our sdcard. I suggest to read an reread the reference link. To do that in our sdcard that contain our RaspberryPI Debian distro we have to: backup our filesystem from linux: cd /media/mymmcblk0p2/ (the partitition that’s contain debian fs) tar -cvpzf /home/gibbio/RPI-TC_fs.tgz --exclude=./proc --exclude=./lost+found --exclude=./sys --exclude=./mnt --exclude=./media --exclude=./dev ./ cd /media/mymmcblk0p1/ (the partitition that’s contain boot kernel etc) tar -cvpzf /home/gibbio/RPI-TC_boot.tgz ./ Now use printcsd.py to find the erase block size, most sd have 128K so we use 128K/Sector size = 256 sectors (mine have 64k so we have to use 64k/512b = 128 sector alignement)

sfdisk -f -H224 -S56 /dev/mmcblk0 Checking that no-one is using this disk right now ... OK Disk /dev/mmcblk0: 244448 cylinders, 224 heads, 56 sectors/track Old situation: Units = cylinders of 6422528 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 0 - 0 0 0 Empty /dev/mmcblk0p2 0 - 0 0 0 Empty /dev/mmcblk0p3 0 - 0 0 0 Empty /dev/mmcblk0p4 0 - 0 0 0 Empty Input in the following format; absent fields get a default value. Usually you only need to specify and (and perhaps ). /dev/mmcblk0p1 :,8,c /dev/mmcblk0p1 0+ 7 8- 50175+ c W95 FAT32 (LBA) (enter enter) /dev/mmcblk0p2 : /dev/mmcblk0p2 8 1246 1239 7771008 83 Linux /dev/mmcblk0p3 : /dev/mmcblk0p3 0 - 0 0 0 Empty /dev/mmcblk0p4 : /dev/mmcblk0p4 0 - 0 0 0 Empty New situation: Units = cylinders of 6422528 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/mmcblk0p1 0+ 7 8- 50175+ c W95 FAT32 (LBA) /dev/mmcblk0p2 8 1246 1239 7771008 83 Linux /dev/mmcblk0p3 0 - 0 0 0 Empty /dev/mmcblk0p4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Do you want to write this to disk? [ynq] y Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).)

gibbio # fdisk -l... Disk /dev/mmcblk0: 8010 MB, 8010072064 bytes 224 heads, 56 sectors/track, 1247 cylinders, total 15644672 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000ee283 Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 100351 50175+ c W95 FAT32 (LBA) /dev/mmcblk0p2 100352 15642367 7771008 83 Linux

now create ext4 FS: mke2fs -t ext4 -E stripe-width=32 -m 0 /dev/mmcblk0p2 make FAT32 partition via gparted gibbio # fdisk /dev/mmcblk0 Command (m for help): p Disk /dev/mmcblk0: 8010 MB, 8010072064 bytes 224 heads, 56 sectors/track, 1247 cylinders, total 15644672 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000ee283 Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 100351 50175+ c W95 FAT32 (LBA) /dev/mmcblk0p2 100352 15642367 7771008 83 Linux Command (m for help): x Expert command (m for help): p Disk /dev/mmcblk0: 224 heads, 56 sectors, 1247 cylinders Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID 1 00 0 2 0 223 56 7 1 100351 0c 2 00 0 1 8 223 56 1023 100352 15542016 83 3 00 0 0 0 0 0 0 0 0 00 4 00 0 0 0 0 0 0 0 0 00 Expert command (m for help): b Partition number (1-4): 1 New beginning of data (1-100351, default 1): 128 Expert command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. Now eject the sdcard, reinsert and make the restore from the tgz: cd /media/mymmcblk0p2/ tar -xvpzf RPI-TC_fs.tgz -C ./ mkdir proc mnt sys boot dev umount /media/mymmcblk0p2/ cd /media/mymmcblk0p1/ tar -xvpzf RPI-TC_boot.tgz -C ./ umount /media/mymmcblk0p1/ Eject the sdcard, plug into our Raspberry Pi and power on!

近来

还好,有些事抓紧办,有些书抓紧看。 未来的几个月中一直是这个状态。

设计,kvm前端,mybox

正好趁现在有设计欲的时候给自己的git服务器换个首页。 kvm前端的脚本已完成,瞬间不想写gui的了,虽然ncurses很好用。。要不先这样,反正都是用来调virt和spice的系统

Rex设计

rex-1

目前已完成 capture,dlayer和tlayer。 IplImage 和 Mat转换可考虑不用了 在写交互的部分,后期完成可能会用gtk。 需要的传感器: 加速度(FPV向) ROI:移动检测 抛弃gtk(时间长,没意思),转用ncurses

菜根谭小记

入世,出世

当阅,当阅,当使劲阅

修身:

应酬: 随缘便是遣缘,似舞蝶与飞花共适;顺事自然无事,若满月偕盂水共圆

评议: 古人闲适处,今人却忙过了一生;古人实受处,今人又虚度了一生。总是耽空逐妄,看个色身不破,认个法身不真耳。 众人以顺境为乐,而君子乐自逆境中来;众人以拂意为忧,而君子忧从快意处起。盖众人忧乐以情,而君子忧乐以理也。

闲适: 君子之心事,天清日白,不可使人不知;君子之才华,玉韫珠藏,不可使人易知。

年终

2012过去了 想想挺快,23了 好像很着急的样子,可不知道急什么 心态,心态

画--增补

这是lofyer早期的作品 1123

这是最近的作品 2012-08-23_07-01-04_117[1]