1. 20 Feb 2011

    Thinkpad T410s, Install Ubuntu 10.10 64bit

    I bought a Lenovo Thinpad T410s a few days ago. After install ubuntu 10.10 64bit, Everything works out of the box: 1. Graphics : yes ( Intel HD, the VGA is blurred. With a DP to DVI adaptor, OK; NVS 3100M, VGA is OK ) 2. Intel SSD, works great, a few tweeks : SSD linux optimization 3. Fingerprint Reader (not tested, I disable it from bios) 4. Wireless, Thinkpad bgn: Yes 5. Ethernet: Yes 6. Camera: Yes 7. Microphone, Audio: Yes 8. SmartCard Reader: Yes

    Trackpad multitouch feature

    xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 1
     xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 20

    TrackPoint

    echo -n 210 > /sys/devices/platform/i8042/serio1/serio2/speed
     echo -n 250 > /sys/devices/platform/i8042/serio1/serio2/sensitivity

    Display NVS 3100M To enable brightness control in X, append ‘Option “RegistryDwords” “EnableBrightnessControl=1”’ to the Device-Section of xorg.conf.

    Flash Player

    sudo add-apt-repository ppa:sevenmachines/flash && sudo apt-get update && sudo apt-get install flashplugin64-installer

    Color: Blue Cast, correct

  2. 19 Feb 2011

    Linux SSD 优化 -- for ubuntu 10.10 64bit

    The conf I make to make less write to SSD, thus make it run a little faster. It’s quite dangerous, since log are not kept and other compromises.

    On my dev machine, which has 8G memory and a SSD, works quite good, trade memory and safety for speed.

    All my source code are sync to remote git repository. On my dev machine, which has nothing but code, I already have safety.

    • 修改/etc/fstab, 为每个分区加上 noatime,data=writeback。/dev/sda1为/ 分区
    sudo tune2fs -o journal_data_writeback /dev/sda1
    • edit /etc/fstab:
    tmpfs /tmp tmpfs defaults 0 0
     tmpfs /var/log tmpfs defaults 0 0
     tmpfs /var/tmp tmpfs defaults 0 0
    • 修改/etc/default/grub
    GRUB_CMDLINE_LINUX="elevator=noop"
     GRUB_TERMINAL=console #not for speed, it looks better
     GRUB_TIMEOUT=2
    • before using apt-get:
    sudo mount tmpfs /var/cache/apt/archives -t tmpfs
     mkdir /var/cache/apt/archives/partial
    • browser cache:
      • firefox: browser.cache.disk.parent_directory = /tmp
      • chrome: –user-data-dir=/tmp
  3. 15 Feb 2011

    Google Chrome’s Special about Pages

    • about:blank
    • about:cache
    • about:crash
    • about:credits
    • about:dns
    • about:histograms
    • about:net-internals
    • about:plugins
    • about:terms
    • about:version
    • about: (same as about:version)
    • about:flags
    • chrome://about (same as about:version)
    • chrome://bookmark
    • chrome://download chrome://extensions
    • chrome://favicon chrome://history
    • chrome://thumb
    • chrome://view-http-cache (same as about:cache)
  4. 16 Jan 2011

    Imdisk 虚拟磁盘

    imdisk

    ImDisk is a virtual disk driver for Windows NT/2000/XP/2003/Vista/2008. It can create virtual hard disk, floppy or CD/DVD drives using image files or system memory

    在windows 7 上时使用时,需要解决权限问题,方法之一是用admin 权限在cmd下运行 这两条命令 详情

    sc config imdisk start=auto
      net start imdisk
    1. imdisk可以当虚拟光驱用,挂载iso文件,就像linux的
    mount -o loop
    1. 用system memory 创建的磁盘, 就像linux 的tmpfs,访问速度很快: image

    这条命令

    imdisk -a -s 5G -p "/fs:ntfs /q /y" -m \#:

    在我的机器上创建了一个5个G的虚拟硬盘,并且格式化,分配一个没有使用的盘符。(我用的是64为的windows 7, 在32位系统上受限于32位虚拟内存地址,可能只能创建2G左右,imdisk是按需 使用内存的,像linux的tmpfs) image ### imdisk 用途

    • 做为ie,firefox,chrome等浏览器的缓存
    • 做为系统的临时目录
    • 挂在ISO文件
    • ……

    google chrome 设置路径的方式

    –user-data-dir=e:

    firefox设置的方式是:

    browser.cache.disk.parent_directory=e:

    方便日常电脑使用,加快电脑速度。

    在linux下,做这些事情方便:mount

    # add the following line to /etc/fstab
     tmpfs /tmp tmpfs defaults 0 0
  5. 22 Dec 2010

    Guava, an open source JAVA library from google

    大概半年以前就听说了guava, an open source java library from google. 今天看了youtube上找到关于它的两个视频,大约一个半小时。

    Youtube - Using the Google Collections Library for Java (1 of 2)

    Youtube - Using the Google Collections Library for Java (2 of 2)

    确实挺好的,推荐使用, maven配置

    
            com.google.code.findbugs
            jsr305
            1.3.9
       
       
            com.google.guava
            guava
            r07