2009年3月2日 星期一

看到一個好玩的貼紙

我看到一個好玩的部落格



我沒通過圖靈測試|Hello, Human → 不光是機器,害羞宅男和正妹聊天時通常也沒辦法pass圖靈測試。

2009年2月20日 星期五

twemu.no-ip.org AMD64/I386 套件庫復活

最近剛整理完,如果官方套件版本追過,就不會更新,使用上請注意一下。

以下是設定的 script
$wget http://twemu.no-ip.org/apt/public.pgp
#sudo -s
#apt-key add public.pgp
#echo 'deb http://twemu.no-ip.org/apt/ ./' >> /etc/apt/sources.list
#echo 'deb-src http://twemu.no-ip.org/apt/ ./' >> /etc/apt/sources.list
給 Debian AMD64/I386 使用, Ubuntu 使用者建議下載原始碼回去自己編譯。(可直接安裝,但不保證穩定性)

現有:
  • amule - eMule 類的 P2P 軟體 (svn r9505) *
  • lxmusic (LXDE 計畫內的) - 簡易型音樂播放軟體 a/i
  • python-zhpy - 用中文寫 python 程式
  • stellarium - 天文軟體 p
  • stepmania 4 - 跳舞機遊戲 a
  • compiz - 3D 動態桌面 a/i
標記:
* 更新過
a amd64
i i386
p 暫時不更新

2009/03/15 第三次更新

2009年2月4日 星期三

ASUS W7SG

Installing Debian Lenny on ASUS W7SG

Last updated: 2009/02/18

General Hardware Specifications of ASUS W7SG :

Hardware Components
Status under Linux
Notes
Intel Core 2 Duo (T8300) Works No special procedure required during installation.
13.3" WXGA Display Works Select Generic LCD Display in Installer
nVIDIA GeForce 9300M G; VRAM : 256MB
Works Download nVIDIA Linux driver.
2 GB, SDRAM, 2DIMMs
Works No special procedure required during installation
250 GB SATA HD
Works No special procedure required during installation
Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller Works No special procedure required during installation
Internal 56k Modem Wasn't tested Wasn't tested
52x DVD-RW/CD-RW (LightScribe) Works No special procedure required during installation
Intel Corporation PRO/Wireless 4965 AGN [Kedron] Network Connection Works Work on Kernel 2.6.24
(iwl4965) and 2.6.28 (iwlagn)
Trusted Platform ModuleWasn't testedWasn't tested
4 cells Lithium-Ion Battery Works No special procedure required during installation
HDA Intel SoundCardWorks
No special procedure required if using Kernel 2.6.x
R5C832 IEEE 1394 Controller (FireWire)Wasn't testedWasn't tested
4 in 1 Memory Card reader (SD/MMC/MS/MS PRO)Wasn't testedWasn't tested
Synaptics TouchpadWorks
Works with default
PCMCIA ExpressWorks
No special procedure required during installation
Included Asus Bluetooth mouseWorks
No special procedure required during installation.
KeyboardWorks
No special procedure required during installation.
1.3 M Pixles Integrated WebCamWorks
Works with Linux uvc
3 x USB 2.0Works
No special procedure required during installation.

This laptop is operating under Kernel version 2.6.28-1-amd64 and 2.6.24-1-amd64

Basic Installation of Debian Lenny:
  • Why to use Debian Lenny : Stable, Safe, and Simple .
  • Obtaining Debian Lenny : Debian Offical Website
  • Installing : Please follow the instruction.
  • Post-Install modifications/tweaks :

    1. Linux Kernel : 2.6.28 (fix crash when enable 802.11n support)

    $sudo -s
    #echo 'deb http://kernel-archive.buildserver.net/debian-kernel trunk main' >> /etc/apt/sources.list
    #wget http://kernel-archive.buildserver.net/key-2009 -O-|apt-key add -
    #apt-get update && apt-get install linux-image-2.6.28-1-amd64 linux-headers-2.6.28-1-all-amd64 linux-kbuild-2.6.28 linux-libc-dev

    2. Webcam

    $sudo -s
    #m-a a-i linux-uvc
    #modprobe uvcvideo

    3. nVidia offical driver

    #wget http://us.download.nvidia.com/XFree86/Linux-x86_64/180.29/NVIDIA-Linux-x86_64-180.29-pkg2.run -O /tmp/nvidia.run

    Logout X, press to CTRL+ALT+F1 tty1, and login.

    $sudo /etc/init.d/gdm stop (or sudo /etc/init.d/kdm stop)
    $sudo -s
    #CC=gcc-4.1 sh /tmp/nvidia.run

    choise 'Compile Kernel' and edit /etc/X11/xorg.conf

    3.Wireless

    $sudo -s
    #apt-get install firmware-iwlwifi
    #modprobe -r iwlagn && modprobe iwlagn 11n_disable=1
    #echo 'options iwlagn 11n_disable=1' >> /etc/modprobe.d/options
Setting up additional features for Debian Lenny
  • use aptitude and nvidia-setting to configure ACPI, TwinView, Notebook Support ...
Configuration Files

  • /etc/X11/xorg.conf :
    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
    # nvidia-xconfig: version 1.0 (buildmeister@builder62) Wed Apr 2 08:22:13 PST 2008


    Section "ServerLayout"
    Identifier "Layout0"
    Screen 0 "Screen0" 0 0
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "Synaptics Touchpad" "synaptics"
    InputDevice "Mouse0" "CorePointer"
    EndSection

    Section "Files"
    RgbPath "/usr/X11R6/lib/X11/rgb"
    EndSection

    Section "Module"
    Load "dbe"
    Load "extmod"
    Load "type1"
    Load "freetype"
    Load "glx"
    Load "synaptics"
    EndSection

    Section "InputDevice"
    Identifier "Synaptics Touchpad"
    Driver "synaptics"
    Option "SendCoreEvents" "true"
    Option "Device" "/dev/psaux"
    Option "Protocol" "auto-dev"
    Option "SHMConfig" "on"
    Option "HorizScrollDelta" "0"
    EndSection

    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "ImPS/2"
    Option "ZAxisMapping" "4 5"
    Option "Buttons" "9"
    Option "Emulate3Buttons" "no"
    EndSection

    Section "InputDevice"
    # generated from default
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection

    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "Unknown"
    HorizSync 30.0 - 110.0
    VertRefresh 50.0 - 150.0
    Option "DPMS"
    EndSection

    Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    EndSection

    Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    EndSubSection
    EndSection
More Specific Information. Specific stuff such as:
  • lspci
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation GeForce 9300M G (rev a1)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
06:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)
09:03.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
09:03.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
09:03.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 12)
09:03.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
09:03.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev ff)

  • lspci

    Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 006 Device 002: ID 174f:5a35 Syntek 1.3MPixel Web Cam - Asus G1s
    Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 005 Device 002: ID 0b05:1712 ASUSTek Computer, Inc. BT-183 Bluetooth 2.0+EDR adapter
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Links:

2009年1月24日 星期六

iwl4965 and Kernel crash

這一兩天 Notebook 炸的唉唉叫,主要是 11n 的部份出問題。
AP 我用 WZR2-G300N 這台機器,然後配 ASUS W7Sg 的硬體。
之前我用一般的 11g 的 AP 都很正常,換成 11n 的 AP 就開始炸了。
那時我用的是 Lenny 預設的 2.6.26 Kernel, 配 firmware-iwlwifi 0.14
然後過了 30 分鐘左右會開始 crash ,解決的方法有幾個:

1. 關 AP 的 11n & WMM 的功能 (真可惜作不到)
2. 換 Kernel 到 2.6.28.1 (請參考 make-kpkg) 然後讓 iwlagn (iwl4965 改名後) 加上一個新的參數 11n_disable=1 , 可以避免掉 11n 的功能開始炸掉 (不關也可以,只是 dmesg 會看到錯誤訊息,連線會不時中斷重新連結而已)

祝大家新年快樂...

2009年1月9日 星期五

mod_security 進 debian unstable

聖誕節後進去的,想玩的可以自己去抓來看。

還有如果你裝的是 apache 1.x 請修改 debian diff file

2008年11月7日 星期五

Yahoo!奇摩 拍賣探勘程式 0.1.2 釋出

廢話不多說,簡單介紹一下改進功能:

1.[增加]模擬瀏覽器存取,自動產生 cookie 和追蹤連結,躲避 999 Error
2.[增加]加速下載時間和產生計時功能
3.[增加]提供中文搜尋
4.[增加]一般中文註解
5.[修正]字串過濾
6.[修正]Debug功能
7.[移除]Proxy功能

點選此下載

2008年9月11日 星期四

Yahoo 拍賣資料探勘程式 0.1

因為我懶得一頁一頁去點 Yahoo 拍賣,因此用 Python SGMLLib 語法剖析器實做 Yahoo 拍賣資料探勘,建議搭配 tor + privoxy 或是更改程式內 sleep 時間(約 90 ~ 120 秒),來迴避 999 error ,使用者請自取,更改 search 的參數可以調整標的物。如果不想用 proxy ,將 proxies=proxies ,含前面逗點拿掉。

點選此下載