2007年10月24日 星期三

gtk-chtheme - GTK+ 2.0 theme changer and previewer utility

gtk-chtheme 是一個 GUI 的程式讓你即時變換 GTK+ 2.0 程式的 Theme。



事實上它是去修改 ~/.gtkrc-2.0 這個檔案,如果手動去改成你要的,也是有效果。

$ cat /home/user/.gtkrc-2.0
# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc"

include "/home/user/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT

2007年10月23日 星期二

一些專有名詞

mass production (MP) 量產
pilot run 試產
engineering sample (ES) 工程樣品
marketing communication (marcom) 行銷傳播

Powered by ScribeFire.

2007年10月21日 星期日

Prolific PL2303 USB to serial adaptor driver for Linux

http://fxr.watson.org/fxr/source/drivers/usb/serial/pl2303.c?v=linux-2.6
  1 /*
2 * Prolific PL2303 USB to serial adaptor driver
3 *
4 * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com)
5 * Copyright (C) 2003 IBM Corp.
6 *
7 * Original driver for 2.2.x by anonymous
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License.
12 *
13 * See Documentation/usb/usb-serial.txt for more information on using this driver
14 *
15 */

Debian Lenny Release schedule

依據"Release Team Meeting results (the Juelich Edition)":
Now on to the draft of the timeline:

August 2007
Start of the first BSP marathon for Lenny, lasting till November. [1]

Early September 2007
The list of release blockers for Lenny is frozen.

Early March 2008
Very soft freeze: Please be extra careful with new versions, and new
transitions. At this point, the list of release goals is frozen.

Start of the second BSP marathon for Lenny.

Early April 2008
Freze of the essential toolchain.

Mid of June 2008
Freeze of the non-essential toolchain and all libraries.

Mid of July 2008
Full freeze.

Early September 2008
Release!
Of course, "Early September" is only an internal goal as of now, the
official communications is "in the second half of 2008".

[1] http://wiki.debian.org/BSPMarathonLenny

利用 bootchart 來分析 Linux 系統的啟動過程

Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process. Resource utilization and process information are collected during the boot process and are later rendered in a PNG, SVG or EPS encoded chart.

在 Debian 中,只要 aptitude install bootchart 即可。之後要去修改 /boot/grub/menu.list,在 kernel 的後面加上 init=/sbin/bootchartd,如:

title Debian GNU/Linux, kernel 2.6.18-5-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-5-686 root=/dev/sda1 ro init=/sbin/bootchartd
initrd /boot/initrd.img-2.6.18-5-686
savedefault
改好之後重開機,bootchartd 就會去蒐集開機過程的資訊。接著:
user@debian:~$ bootchart
Parsing /var/log/bootchart.tgz
Wrote image: ./bootchart.svgz
就可以在目前目錄找到一個 bootchart.svgz 檔,這是一個 gzip 壓縮過的檔案,把它改名成 bootchart.svg.gz,然後下 gzip -d bootchart.svg.gz,就可以得到 bootchart.svg 檔。

再透過 Online SVG to PNG/JPEG/TIFF conversion 這個網站的幫助,就可以幫我們轉出 png 檔。

從圖上可以看到一些系統的資訊、開機總共花的時間,以及啟動了哪些 process。

PS: 在 VMware 中 boot Debian Etch 的 bootchart:


[Updated]
透過 rcconf 工具,把 cupsys, exim4, nfs-common 都 disable 之後,比之前快了 8 秒。

2007年10月20日 星期六

Debian 下看系統硬體資訊

1. lspci

user@debian:~$ lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0f.0 VGA compatible controller: VMware Inc [VMware SVGA II] PCI Display Adapter
00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
00:11.0 PCI bridge: VMware Inc Unknown device 0790 (rev 01)
02:00.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)
02:01.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)
2. lshw
user@debian:~$ lshw
debian
description: Computer
width: 32 bits
*-core
description: Motherboard
physical id: 0
*-memory
description: System memory
physical id: 0
size: 128MB
*-cpu
product: Intel(R) Pentium(R) M processor 1.80GHz
vendor: Intel Corp.
physical id: 1
bus info: cpu@0
version: 6.13.6
size: 1800MHz
width: 32 bits
capabilities: fpu fpu_exception wp vme de pse tsc msr mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss up
*-pci
description: Host bridge
product: 440BX/ZX/DX - 82443BX/ZX/DX Host bridge
vendor: Intel Corporation
physical id: 100
bus info: pci@00:00.0
version: 01
width: 32 bits
clock: 33MHz
[...以下略...]
3. lshw-gtk (The GTK+ Version)

2007年10月19日 星期五

ps 轉成 pdf 檔

在 Debian 中,先安裝 gs-gpl,然後就可以有 ps2pdf 這隻程式可以用。
$ ps2pdf foo.ps




Powered by ScribeFire.

2007年10月17日 星期三

A simple debug macro

#undef TRACE
#undef TRACEX
#if 1
# define TRACE printf
# define TRACEX(X) \
printf("<%s:%s():L%u> ", __FILE__, __FUNCTION__, __LINE__); \
printf##X;
#else
# define TRACE(...)
# define TRACEX(...)
#endif


Powered by ScribeFire.

2007年10月16日 星期二

History of the microprocessor

2007年10月15日 星期一

8051 Simulator

  • EdSim51 - The 8051 Simulator for Teachers and Students - A virtual 8051 is interfaced with virtual peripherals such as a keypad, motor, display, UART, etc. The student can write 8051 assembly code, step through the code and observe the effects each line has on the internal memory and the external peripherals.
  • MCU 8051 IDE - Fully featured Integrated Development Enviroment for 8051, for POXIS systems (like GNU/Linux), written in Tcl/Tk. It constist of advanced text editor with syntax validation, assembler, disassembler, simulator, scientific calculator any many other things.
  • Electronic simulator 8051 - This software can be used to very simple show how to 8051 working. You can very simple conect to procesor gates, LED-s, switch ...,and load software to procesor and see rezult, how all device will work.

2007年10月14日 星期日

日劇中常見的日本警察之階級

警部 - 如:名偵探科南裡的『目幕警部』

警部けいぶ)為警察官階級之一。日本警察階級中位於警視之下、警部補之上。 職位包括警察本部之系長至副課長、警察署之課長、派出所所長等。
警部補 - 如:古畑任三郎
警部補 (けいぶほ)為日本警察之階級之一。位居警部之下、巡査部長之上。
警察署之系長、警察本部之系主任、系長、交番之所長等職位、負責擔任警察實務與現場監督的工作。

Linux Runlevels

Initialization sequence in GNU/Linux 摘錄出來:

A runlevel describes the basic running state of the system

There are a number of runlevels that are, by convention, used to describe a working Linux system, with 2 or 3 being usual for a multi-user configuration. The complete list is given below (according the Linux Standards Base - LSB).

  • Runlevel 0 (halt) - Shuts down everything and brings the system to halt.
  • Runlevel 1 (single user) - Useful for maintenance work.
  • Runlevel 2 (multi-user) - multi-user, but with no network services exported.
  • Runlevel 3 (multi-user) - normal/full multi-user mode.
  • Runlevel 4 (multi-user) - reserved for local use. Usually the same as 3.
  • Runlevel 5 (multi-user) - multiuser, but boots up into X Window, using xdm, or similar.
  • Runlevel 6 (Reboot) - As 0, but reboots after closing everything down.

Most systems default to 2, 3 or 5.

Firefox3 Snapshot

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/

Firefox 的記憶體釋放

在參考了 Goston’s Blog » [FF] Firefox 的記憶體釋放Mozilla Taiwan 討論區: FF 2.0.0.7 沒了config.trim_on_minimize? 後。我也想來試試看效果好不好。

因為我是用 Firefox 2.0.0.7,要啟用 config.trim_on_minimize,就要自己加,作法如下:

  1. 在自己帳號下的 Firefox profile 目錄(如:C:\Documents and Settings\<帳號>\Application Data\Mozilla\Firefox\Profiles\<亂數名目錄>),建立一個 user.js 檔。
  2. user.js 內容為:
  3. // Allow Windows to swap out memory when the program is minimized
    user_pref("config.trim_on_minimize", true);
  4. 重開 Firefox 即可。
FYI: http://kb.mozillazine.org/Config.trim_on_minimize

What's the difference between Versatile PB and Versatile AB?

轉錄自:http://arm.embedinfo.com/news-list3.asp?id=246

Q: What is the difference between Versatile PB and Versatile AB?

A: Versatile PB and Versatile AB are software compatible. Versatile PB is designed for
SoC designer and software developer. Versatile AB is only intended for software
developer.