火曜日, 2月 24, 2009

Speed up your web pages with YSlow

Speed up your web pages with YSlow

Originally from [EBook]OReilly - High Performance Web Sites

O'Reilly High Performance Web Sites 14条准则:
  • Make Fewer HTTP Requests
  • Use a Content Delivery Network
  • Add an Expires Header
  • Gzip Components
  • Put CSS at the Top
  • Move Scripts to the Bottom
  • Avoid CSS Expressions
  • Make JavaScript and CSS External
  • Reduce DNS Lookups
  • Minify JavaScript
  • Avoid Redirects
  • Remove Duplicate Scripts
  • Configure ETags
  • Make Ajax Cacheable

月曜日, 2月 23, 2009

Gentoo Network Configuration

Gentoo Network Configuration

Marcoさんの書き込み

Ok post the the result of following commands:
dmesg grep -i eth0
ifconfig -a
cat /var/lib/portage/world grep -i dhc*

If you have a right kernel configuration... do this:

For dhcp connection:

#emerge net-misc/dhcpcd

#dhcpcd eth0 ##manual configuration

Configuring a network interface to load at boot time:

#nano /etc/conf.d/net ##and paste the follow 2 lines:

modules=( "dhcpcd" )
config_eth0=( "dhcp" )


Create the right symlink:
#cd /etc/init.d/
#ln -s net.lo net.eth0

Add net.eth0 at default runlevel:
# rc-update add net.eth0 default
# rc



pcnet32を使いたい時

modprobe pcnet32
vi /etc/modprobe.conf
Add > alias eth0 pcnet32

Set Gentoo LiveCD Root Password

Set Gentoo LiveCD Root Password
In gentoo when you first install, the root pw is scrambled so you have to go to the console
  1. Press ctl-alt-F1

  2. In the root console type passwd and then type your new password

  3. To get BACK to the GUI try (or one of the Function keys) to bring you back to the GUI window. The console window says to type "gdm" or "startx" but X is already running so this won't work.

Gentoo:The X Server Configuration HOWTO

The X Server Configuration HOWTO

立ち上げる時can't open /etc/fb0のようなエラーがあれば、/boot/grub/menu.lstにvga=xxxを追加すれば、解決できるかもしれません。

Gentoo : How to start with gdm?

How to start with gdm?

Here is it as sepcified by taurus
  1. Run
    rc-update add xdm default
  2. edit /etc/rc.conf and add these two lines at the end of it
    DISPLAYMANAGER="gdm"
    XSESSION="Gnome"

Debugging the Linux kernel using Eclipse/CDT and Qemu

CSC 2/456 Operating Systems
  1. An Introduction to the Linux-based Assignments
  2. Adding a new system call to the Linux kernel


Debugging the Linux kernel using Eclipse/CDT and Qemu

Using IDA's GDB debugger with QEMU emulator ここもダウンロードできます

Unix and CS Info Pages and Links
Using QEMU for CS 45 Linux Kernel Projects

日曜日, 2月 22, 2009

Archのインストール

ArchWiki :: Main Page - ArchWiki

設定ファイルは殆ど/etcにあって、まずここにgrepしてみよう。
  1. キーボード変更
    /bin/loadkeys
  2. Pacman
  3. Configuring network
  4. Xorg
  5. KDE
    pacman -S kde
  6. LXDE


Archlive(简体中文)

How to Install Arch Linux
  1. Run /arch/setup to build only the base system
  2. Add graphical desktop environment(Such as:GNOME or KDE)
archlinux-2009.08-1-archboot.iso起動後の画面

Font Setting on Arch


Use pacman -Syu to solve [solved]util-linux-ng conflicts with e2fsprogs

木曜日, 2月 19, 2009

initrdとinitramfs

initramfs (initrd) の init を busybox だけで書いてみた



initrdinitramfs
イメージファイルシステム (ext2など + gzip)アーカイブ (cpio + gzip)
実装ブロックデバイス (RAM ディスク)ファイルシステム
実行/linuxrc/init
rootfs
マウント
適当なディレクトリへマウントして
pivot_root
/ へマウント (switch_root)
init 起動/linuxrc 終了後、カーネルが起動/init が exec /sbin/init する

ファイル整形ソフトUniversalIndentGUI

ファイル整形ソフト
UniversalIndentGUI

水曜日, 2月 18, 2009

みんなの知識【ちょっと便利帳】

このサイトはちょっと面白いだと思って、リンクさせていただきます。

みんなの知識【ちょっと便利帳】

ホームページ中に下のような説明が有ります
  • Description:ちょっと便利ではなく、本当は、とても便利なツールになるよう編集しています。全国地名読み方。ものの数え方。世界の時間・時差。年齢計算。和暦(元号)西暦変換。度量衡。紙・印刷物などのサイズ。二十四節気。世界の地図。ストップウォッチなど便利なツールがいっぱい。ちょっと便利帳は、みんなの知識委員会の制作です。

  • Keywords:地名読み方,県庁所在地,時差,日本地図,カレンダー,年齢計算,和暦,元号,西暦,二十四節気,ストップウォッチ,法事,春の七草,秋の七草,年回忌,ものの数え方,助数詞,漢字,漢数詞,度量衡,記号,サイズ,モールス信号,距離,金利計算,指文字,指点字,国旗,ジグソーパズル,魚の名前,べんり,べんり帳,べんりツール,ちょっとべんりちょう,みんなの知識,ちょっと便利帳

火曜日, 2月 17, 2009

MKISOFS

MKISOFS

参数老多,DOS下运行,可以使用MKISOFS -HELP查看,以下为常用参数

01-o Set output file name 设置输出文件名
02-no-emul-boot

Boot image is 'no emulation' image

非模拟模式启动
03-eltorito-boot Set El Torito boot image name 设置EL启动文件
04-hide-rr-movedRename RR_MOVED to .rr_moved in Rock Ridge tree 隐藏 Unix RR 目录
05-hide Hide ISO9660/RR file 隐藏 ISO9660 文件
06-hide-joliet Hide Joliet file 隐藏 Joliet 文件
07-VSet Volume ID 设置文件卷标信息
08-copyright Set Copyright filename 设置文件版本信息
09-J

Generate Joliet directory information

支持 Joliet 格式
10-OOptimize for iso space(md5 technology) 采用 MD5 空间优化
11-RGenerate Rock Ridge directory information 支持Rock Ridge格式
12-NOmit version number from ISO9660 filename (violates ISO9660)忽略版本号(如果使用DiskEmu必须选用)


13-lAllow full 31 character filenames for ISO9660 names 允许长文件名
14-relaxed-filenamesAllow 7 bit ASCII except lower case characters (violates ISO9660) 扩展的文件名
15-gbk4dos-filenamesAllow 8 bit ASCII GBK standard code characters (violates ISO9660) DOS下支持中文
16-gbk4win-filenamesAllow 8 bit ASCII GBK standard code characters (violates ISO9660) WIN下支持中文
建立任意目录,包含ISO、PE、MKISOFS等文件

mkisofs -J -O -R -N -l -relaxed-filenames -gbk4dos-filenames -gbk4win-filenames -b grldr -no-emul-boot -boot-load-size 4 -o iso\mycd.iso pe

生成一个以 GRLDR为启动文件的ISO文件,保存到ISO目录,包含PE文件夹下全部内容!

mkisofs(md5 完美版) 1.15a40

エディタの比較




WindowsLinux
テクストメモ帳 Leafpad
秀丸 Gedit , Scrives , Geany
xyzzy emacs
Visual Studio Anjuta
バイナリStirling GHex HexEdit



エディタ← Leafpad gedit  medit Geany Anjuta  →IDE
      Kedit  Kwrite Kate     KDevelop


バイナリエディタ

月曜日, 2月 16, 2009

PythonでAmazon Webサービスに接続する

PythonでAmazon Webサービスに接続する

PyAWS is a Python wrapper for the latest Amazon Web Service. It is designed to pave the way for Python developers to interactivate AWS. This project is forked from the code base of pyamazon. The Amazone E-Commerce Services is supported.

日本語形態素解析

ウィキペディア(Wikipedia)にある形態素解析

フリーで入手可能なもの

外部リンク


日本yahooの日本語形態素解析

Python から Yahoo! 日本語形態素解析Webサービスを使う (1)(2)(3)

mkisofs.exe

mkisofs.exe

ここにもダウンロードできます

BERRY LINUX の再構成
mkisofs -l -J -V "BERRY-your_name" -v -b BERRY/boot.img \
-c BERRY/boot.cat -o /somewhere/BERRY-cd.iso /mnt/master



Slax Remaster
ファイルmake_iso.bat

@ECHO OFF

REM ----------------------------------------------------
REM Batch file to create bootable ISO in Windows
REM usage: make_iso.bat c:\new-slax.iso
REM author: Tomas M.
REM ----------------------------------------------------

if "%1"=="" goto error1
cd ..
set CDLABEL=SLAX

slax\tools\WIN\mkisofs.exe @slax\tools\WIN\config -o "%1" -A "%CDLABEL%" -V "%CDLABEL%" .
echo.
echo New ISO should be created now.
goto theend

:error1
echo A parameter is required - target ISO file.
echo Example: %0 c:\target.iso
goto theend

:error2
echo Error creating the ISO file
goto theend

:theend
pause

ファイルconfig

-v
-J
-R
-D
-no-emul-boot
-boot-info-table
-boot-load-size 4
-b "boot/isolinux/isolinux.bin"
-c "boot/isolinux/isolinux.boot"

wget利用方法

wget利用方法

wget ファイルをダウンロードする

Windows で wget を使う方法
ダウンロード

プロキシの設定
windows上に使う時、wgetと同じディレクトリにwget.iniを作って、プロキシを設定する形です。

Linuxの起動時のvga=の設定

vga=の部分に入れる10進もしくは16進の数
16進表記
.640×480800×6001024×7681280×1024
256色0x3010x3030x3050x307
32768色0x3100x3130x3160x319
65536色0x3110x3140x3170x31A
16777216色0x3120x3150x3180x31B
10進表記
.640×480800×6001024×7681280×1024
256色769771773775
32768色784787790793
65536色785788791794
16777216色786789792795

日曜日, 2月 15, 2009

How to: Compile Linux kernel 2.6

How to: Compile Linux kernel 2.6

missing-syscalls エラー

プロキシサーバ経由でyumを使う

プロキシサーバ経由でyumを使う時



/etc/yum.conf或いはシェルのプロファイルの追記で設定できます。
  1. /etc/yum.confに下のようなproxyの設定を追加
    # The proxy server - proxy server:port number
    proxy=http://mycache.mydomain.com:3128/
    # The account details for yum connections
    proxy_username=yum-user
    proxy_password=qwerty
  2. /etc/profile.dにシェルファイルproxy.shのようなスクリプトを追加
    export http_proxy=http://Proxy Server:Port/
    export ftp_proxy=http://Proxy Server:Port/
    export HTTP_PROXY=http://Proxy Server:Port/
    export FTP_PROXY=http://Proxy Server:Port/





SabayonのSpritz/Equoのプロキシの設定
/etc/entropy/entropy.conf

玄箱

玄箱

土曜日, 2月 14, 2009

MTS形式のファイルの再生

MTS形式のファイルの再生方法

Codec Guide: K-Lite Codec Pack and other useful stuff中のK-Lite Mega Codec Pack ここのブログにも書いてあります

PC上のAVCHDの再生
  1. AVCHD影像圧縮を解凍するデコーダー ⇒ CoreAVC Professional Edition
  2. 高画質編集のためにはHDVのMPEG2に変換 ⇒「TMPGEnc 4.0 XPress」


ProCoder3での変換
  1. 安装ProCoder3
  2. 将要转换的文件的扩展名*.MTS更改为*.M2TS(这步很关键)
  3. 在目标里选择加入欲转换的格式,一般用MPEG2-DVD-PAL格式


デジカメ動画活用

完美解码 PureCodec

vmxファイルの作成

  • VMXファイルの詳細:
    VMX-file parameters

  • ツールでのセット
    1. 単一の実行ファイルVMX Builder
    2. ウェブサイトEasyVMX!: Virtual Machine Creator


  • ディスクイメージの作成
    VMware Playerのイメージをqemuで作成
    1. イメージファイルの作成
      qemu-img create -f vmdk image.vmdk 10G

    2. configファイル作成
      config.version = "8"
      memsize = "256"
      ide0:0.present = "true"
      ide0:0.fileName = "image.vmdk"
      ide1:0.present = "true"
      # CD-ROMを利用
      ide1:0.fileName = "auto detect"
      ide1:0.deviceType = "atapi-cdrom"
      # ISOイメージを利用する場合はこちらのコメントを外す
      # ide1:0.fileName = "/path/to/foo.iso"
      # ide1:0.deviceType = "cdrom-image"
      ethernet0.present = "true"
      ethernet0.connectionType = "nat"
      guestOS = "otherlinux"

    3. guestOSに指定する値について

      Guest OS の種類vmx の guestOS
      Windows 3.1win31
      Windows 95win95
      Windows 98win98
      Windows Mewinme
      Windows NTwinnt
      Windows 2000 Professionalwin2000pro
      Windows 2000 Serverwin2000serv
      Windows 2000 Advanced Serverwin2000advserv
      Windows XP Home Editionwinxphome
      Windows XP Professionalwinxppro
      Windows XP Professional x64 Editionwinxppro-64
      Windows Server 2003 Web Editionwinnetweb
      Windows Server 2003 Standard Editionwinnetstandard
      Windows Server 2003 Enterprise Editionwinnetenterprise
      Windows Server 2003 Small Businesswinnetbusiness
      Windows Server 2003 Standard x64 Editionwinnetstandard-64
      Windows Server 2003 Enterprise x64 Editionwinnetenterprise-64
      Windows Vistawinvista
      Windows Vista x64 Editionwinvista-64
      Red Hat Linuxredhat
      Red Hat Enterprise Linux 2rhel2
      Red Hat Enterprise Linux 3rhel3
      Red Hat Enterprise Linux 3 64-bitrhel3-64
      Red Hat Enterprise Linux 4rhel4
      Red Hat Enterprise Linux 4 64-bitrhel4-64
      SUSE Linuxsuse
      SUSE Linux 64-bitsuse-64
      SUSE Linux Enterprise Serversles
      SUSE Linux Enterprise Server 64-bitsles-64
      Novell Linux Desktop 9nld9
      Sun Java Desktop Systemsjds
      Mandrake Linuxmandrake
      Turbolinuxturbolinux
      Ubuntuubuntu
      Ubuntu 64-bitubuntu-64
      Other Linux 2.4.x kernelother24xlinux
      Other Linux 2.4.x kernel 64-bitother24xlinux-64
      Other Linux 2.6.x kernelother26xlinux
      Other Linux 2.6.x kernel 64-bitother26xlinux-64
      Other Linuxotherlinux
      Other Linux 64-bitotherlinux-64
      Solaris 9solaris9
      Solaris 10solaris10
      Solaris 10 64-bitsolaris10-64
      MS-DOSdos
      FreeBSDfreebsd
      FreeBSD 64-bitfreebsd-64
      Otherother
      Other 64-bitother-64




vmxファイルの作成

木曜日, 2月 12, 2009

GDAL - Geospatial Data Abstraction Library

GDAL - Geospatial Data Abstraction Library
GDAL is a translator library for raster geospatial data formats that is released under an X/MIT style Open Source license by the Open Source Geospatial Foundation.

UNetbootin

UNetbootin
UNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD.

超ドライバリンク

DriversCollection.com
超ドライバリンク集 自作パソコン・周辺機器の総合デバイスドライバーリンク集

RTL8101ドライバ導入

# make clean modules
# make install
# depmod -a
# insmod ./src/r8101.ko
# lsmod grep r8101


さらに、起動時にRTL8169ドライバを読み込まないように教えます。
# echo "blacklist r8169" > /etc/modprobe.d/blacklist-network


この状態で初期状態の設定を更新。
# update-initramfs -u

水曜日, 2月 11, 2009

Berry Linuxの中国語化(シリーズⅡ)

Berry Linuxは大袈裟に言うとFedora + KnoppixのLinuxで、日本の方によって開発されたOSです。個人的にFedoraとKnoppixが好きで、FedoraとKnoppixのいい所をもぎ取って作られたBerry Linuxに対して、たいへん興味を持っています。Knoppixのハードウェアの自動検索機能とFedoraの豊富なパッケージの組み合わせで、自分に適したOSと認識してます。

  1. 中国語フォント
    berry-0.95.iso中のBERRYファイルを見ると、日本語フォントが下の二つのディレクトリに置かれています。
    Bitmap
    /usr/share/fonts/japanese-bitmap-fonts/

    TrueType
    /usr/share/fonts/ja/TrueType/


    中国語のビットマップフォント文泉驿中文点阵宋体(下载PCF格式)を利用します。
    wqy-bitmapfont-pcf-0.9.9-0.tar.gzのINSTALLファイルにインストール方法が詳しく書かれて、インストールディレクトリは/usr/share/fonts/wenquanyi/wqy-bitmapfontに推薦してあります。
    INSTALLファイルの全文

    ==========================================================

    Wen Quan Yi Bitmap Song CJK Fonts

    Installation Guide

    ----------------------------------------------------------

    The WenQuanYi Bitmap Song font (medium and bold weight) was
    packaged into three equivalent formats: BDF (Bitmap Distribution
    Format), PCF (Portable Compiled Format) and TTF(True-type).
    All formats are supported by most modern X-window systems
    (TTF format requires FreeType 2.x or later). You can choose
    any of them based on your preference.


    == Quick Summary ==

    We highly suggest you downloading our DEB (for debian-based
    systems) or RPM (for Redhat-based systems) installation
    packages. One-command-installation can be achieved by
    dpkg -i wqy-bitmapfont-*.deb
    for deb package, or
    rpm -ivh wqy-bitmapfont-*.rpm
    For some users, the installed font can not be selected
    from font list, you may verify and make sure that a file
    named "85-wqy-bitmapsong.conf" is copied to /etc/fonts/conf.d
    directory.


    == PCF/BDF Package Installation ==

    1. download

    You can find the installation package from
    our sourceforge download site at

    http://sourceforge.net/project/showfiles.php?group_id=128192&package_id=156288

    choose the latest release and select your preferred
    font format, save the installation file to a temporary
    directory, for example /tmp.

    2. decompression

    The package is usually a gz-ed tarball, to extract the files

    tar zxvf wqy-bitmapfont*.tar.gz

    or

    gunzip wqy-bitmapfont*.tar.gz
    tar xvf wqy-bitmapfont*.tar


    3. move directory (optional)

    You can find all extracted file under a subdirectory
    called "wqy-bitmapfont". You might want to move this
    directory to the location where you want
    to install the font, a good place is

    /usr/share/fonts/wenquanyi/wqy-bitmapfont

    To move the directory, you need to use "su" or "sudo" to obtain
    root privileges. (If you don't have root privileges, please
    refer to Section 6)

    4. font path setup

    Now you need to tell X-window where to find the installed font.
    There are two major font management mechanisms: X-core font
    and fontconfig. We will discuss the installation for
    X-core font first.

    Assuming you have installed the font to
    /usr/share/fonts/wenquanyi/wqy-bitmapfont/

    execute the follow commands

    su
    cd /usr/share/fonts/wenquanyi/wqy-bitmapfont/
    rm fonts.dir fonts.scale fc-cache.*
    mkfontdir .
    cp fonts.dir fonts.scale
    xset +fp /usr/share/fonts/wenquanyi/wqy-bitmapfont/

    the last command adds the font path to the font path
    list of current X-window session. To permanently add this path,
    you need to add

    FontPath "/usr/share/fonts/wenquanyi/wqy-bitmapfont/"

    to /etc/X11/xorg.conf, under any line starting with "FontPath",
    for example:

    FontPath "unix/:7100"

    if your system does not have xorg.conf, you are probabily
    running XFree86, then you should do the same thing for
    /etc/X11/XF86Config-4

    If you see "unix/:7100" in your xorg.conf, your X window
    is using "xfs". Typing the path to the font in /etc/X11/fs/config
    under the line "catalogue =/usr/lib/X11/fonts/misc/,"
    can do the same thing as you modify xorg.conf.

    Now you have done with X Core font set up. Most recent
    versions of Linux X programs support Xft/fontconfig, which
    is a set of font search/selection rules. To make fontconfig
    aware of the newly installed WenQuanYi bitmap font, you need to
    insert the following line

    /usr/share/fonts/wenquanyi/wqy-bitmapfont/

    to /etc/fonts/fonts.conf or ~/.fonts.conf, however, if you
    installed the font into a subdirectory under /usr/share/fonts/,
    this is not required.

    we provided a fontconfig file specifically optimized for wqy bitmap fonts,
    named "85-wqy-bitmapsong.conf". To activate the optimized settings, you
    need to install this file as well. If /etc/fonts/conf/ directory exists
    in your system, please directly move this file to that directory. If it does
    not exist, you need to add the following line to the
    end of /etc/fonts/fonts.conf (before )

    /usr/share/fonts/wenquanyi/wqy-bitmapfont/85-wqy-bitmapsong.conf

    if you are using the latest fontconfig-2.4.x, you can also move this file
    to ~/.fontconfig/ directory, it will also do the job.

    After all of above steps, type "fc-cache -f -v" to update fontconfig,
    In most cases, you need to restart your X-window in order to activate
    all the settings.


    5. test

    To test if the font is successfully installed, the following
    command

    /usr/X11R6/bin/xlsfonts grep 'wenquanyi'


    would print something like followings (you may also see font names for gb2312/big5 etc)

    -wenquanyi-wenquanyi bitmap song-bold-r-normal--0-0-75-75-p-0-iso10646-1
    -wenquanyi-wenquanyi bitmap song-bold-r-normal--12-120-75-75-p-119-iso10646-1
    -wenquanyi-wenquanyi bitmap song-bold-r-normal--13-130-75-75-p-80-iso10646-1
    -wenquanyi-wenquanyi bitmap song-bold-r-normal--15-150-75-75-p-80-iso10646-1
    -wenquanyi-wenquanyi bitmap song-bold-r-normal--16-160-75-75-p-80-iso10646-1
    -wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-75-75-p-0-iso10646-1
    -wenquanyi-wenquanyi bitmap song-medium-r-normal--12-120-75-75-p-119-iso10646-1
    -wenquanyi-wenquanyi bitmap song-medium-r-normal--13-130-75-75-p-80-iso10646-1
    -wenquanyi-wenquanyi bitmap song-medium-r-normal--15-150-75-75-p-80-iso10646-1
    -wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75-75-p-80-iso10646-1
    ....

    for fontconfig, you need

    fc-list grep 'WenQuanYi'

    you would expect to see the following two lines as output

    WenQuanYi Bitmap Song:style=Bold
    WenQuanYi Bitmap Song:style=Regular

    With KDE or GNOME font selection tools, you should be able to see
    "WenQuanYi Bitmap Song" in the font name list.


    6. installation as a normal user

    If you do not have root privilege, for example, you are using
    public machines, to install this font is also very simple.
    If you are using KDE, find "Control Center" from the K-menu
    (or type kcontrol from console), choose "System Administration"
    and click on "Font Installer", right click on the middle panel,
    choose "add font", locate the extracted fonts (bdf/pcf) files.

    If you are using Gnome environment, double click on "Computer",
    type "fonts:/" on the address bar, and type enter. Open another
    file browser and select the bdf/pcf.gz font files, drag or
    copy/paste to the fonts:/ folder.

    If you do not have X-window started, you can also install the
    font by extracting the BDF/PCF files to ~/.fonts/ directory
    (if it does not exist, create one after making sure you have
    fontconfig installed).

    You may also add the following line to ~/.fonts.conf to use
    pre-set configurations

    /path/to/wqy-bitmapfonts/
    /path/to/85-wqy-bitmapsong.conf

    7. Turn on Chinese language support on your system

    To correctly display Chinese, your system should
    support Chinese language. You need to install the related
    packages (for example, sudo apt-get install kde-i18n-Chinese*)
    Then put the following line

    LC_CTYPE=zh_CN.UTF-8

    into ~/.i18n and reboot your system (this file may not exist, in
    that case, you need to create it first by "touch ~/.i18n".
    you can also use other locales in the output of
    "ls -d /usr/lib/locale/zh_*"). To enable command line Chinese
    message, replace "LC_CTYPE" by "LC_ALL". If you want all menu displayed
    with Chinese language, on KDE, goto "Control center", click on "Region and
    Assistance", find "Country/Region and Language", choose "Chinese" from
    "Add language"; if you are using Gnome, you need to select "Preference"
    and "Language", then add "Chinese". Restart your X or system
    if necessary to enable this setting. If you can not select "Chinese" for
    either desktop environments, you need to install the corresponding
    language package first.


    == TTF Package Installation ==

    To install TTF version of Wenquanyi bitmap font is a little bit tricky.
    The font file is a special type of TTF, called SFNT (or sbit only) TTF.
    This format is supported by FreeType 2.x or later. Unfortunately,
    ttfmkdir and fc-cache can not recognize this format. So, we packaged
    hand-writen configuration files, fonts.dir/fonts.scale/fonts.cache-1,
    in the release.

    The installation process is very similar to PCF/BDF version, you can
    type ttmkfdir and fc-cache -fv, in that case, the hand-writen config
    files will be overwriten. You can find a font.config.tar.gz in the
    installation file, you need to decompress this file and restore
    the correct fonts.* files. In the future, anytime you submit
    fc-cache -fv, you need to repeat the above process.

    == RPM Package Installation ==

    if your system support RPM, to use RPM package is the simplest.
    you simply type

    sudo rpm -Uvh wqy-bitmapfont*noarch.rpm

    then after restarting your X-window, you should be able
    to use this font.

    == Other issues ==

    For some old applications, such as Emacs, XMMS, you may need to
    do some extra configurations, you can search our FAQ page for
    more details

    http://wqy.sourceforge.net/cgi-bin/index.cgi?FAQ


    ==========================================================



    文泉驿のサイトにFedora 8 文泉驿字体使用指南があります。
    1. 文泉驿点阵宋体
       sudo yum install wqy-bitmap-fonts
    2. 文泉驿正黑体
       sudo yum install wqy-zenhei-fonts
    3. 文泉驿Unibit
       sudo yum install wqy-unibit-fonts



rpm, deb パッケージの展開方法

rpm, deb パッケージの展開方法
  • rpm
    # rpm2cpio hoge.rpm | cpio -id

  • deb
    # dpkg-deb -x hogehoge.deb ./

Linux: Find out Ethernet card driver name

Linux: Find out Ethernet card driver name
# dmesg | grep 'Ethernet driver'

# grep 'Ethernet driver' /var/log/dmesg

Online Linux Documentation

Linux HeadQuarters
Kernel Module Programming

The Linux Documentation Project

Index of Documentation for People Interested in Writing and/or
Understanding the Linux Kernel.

The Linux Kernel: The Book


Free On-line Linux Technical Books and Tutorials
Linux Kernel in a Nutshell

Fultus eLibrary - Technical Literature
Publisher of out-of-print and new print-on-demand (POD) books, online eBooks, documentation. Manuscript self publishing for authors. Free eBooks in eLibrary for free reading and promote books. Online bookstore.

The Open Group Base Specifications Issue 6
This standard defines a standard operating system interface and environment, including a command interpreter (or "shell"), and common utility programs to support applications portability at the source code level. This standard is the single common revision to IEEE Std 1003.1-1996, IEEE Std 1003.2-1992, and the Base Specifications of The Open Group Single UNIX Specification, Version 2. This standard is intended to be used by both applications developers and system implementors.



A Visual Expedition Inside the Linux File Systems

木曜日, 2月 05, 2009

在Puppy Linux上如何安装gcc开发环境(シリーズⅣ)

シリーズⅢまで、使用方法について、あちこちのサイトをみてきました。これから、プログラムの話題に入ります。

Puppyのメイン及び関連のダウンロードサイト
  1. Puppy Linux大本営
  2. Puppylinux.ca ここに色んなファイルをダウンロードできます。
    http://puppylinux.ca/puppyfiles/
    http://puppylinux.ca/members/
    http://puppylinux.ca/tpp/bugs/
    http://puppylinux.ca/tpp/
    Puppy Linux Discussion Forum
    dokupuppy - Puppy Linux wiki
  3. パピーリナックス日本語版
    日本語化したアプリケーションのソースファイル
  4. http://distro.ibiblio.org/pub/linux/distributions/puppylinux/
    Kernel Source


中文Puppy Linux开发者之家里,详细地介绍了如何安装gcc开发环境,从Puppy Download进入sfs_modules-4里下载devx_xxx.sfs模块。

How to compile the kernel and drivers for Puppy

Puppy Linux 中文化方法介绍,提供中文支持包和相关软件下载(シリーズⅢ)

シリーズⅡに続いて、Puppy Linux 中文化方法介绍,提供中文支持包和相关软件下载
  1. 中文字体
    中文论坛建议用文泉驿中文点阵宋体,下载PCF格式,拷贝到/usr/share/fonts/wenquanyi/目录下或/usr/X11R7/lib/X11/fonts/misc/目录下

  2. 中文输入法
    • 中文论坛提议使用fcitx,网站是http://www.fcitx.org/
      在/root/.xinitrc里比较靠前的位置添加以下代码,重启X服务器之后就可以使用fcitx小企鹅输入法

      export LC_CTYPE="zh_CN.utf8"
      export XMODIFIERS="@im=fcitx"
      export GTK_XIM_MODULES="fcitx"
      export QT_XIM_MODULES="fcitx"
      fcitx &

    • 中文论坛也给出了SCIM输入法软件包的下载连接,对于要使用多国语言支持的场合,需要装上SCIM关联的输入法。

      scim-1.4.7-i486.petIM engine for CJK languages
      scim-anthy-1.2.6-i486.petscim IM engine for anthy
      scim-bridge-0.4.15-i486.petim engine
      scim-bridge-qt4-p4.pet
      scim-canna-1.0.1-i486.petscim IMEngine for canna
      scim-m17n-0.2.2-i486.petscim IM engine
      scim-pinyin-0.5.91-i486.pet中文拼音
      scim-tables-0.5.8-i486.petdata for scim IM

      上面的一些现在不知道其中具体是指中,日等的哪种输入法,只是在网上找到过去的资料(如:Internationalization in Mandrakelinux 10.1)。

      Available Input Methods

      scim-fcitx的安装:(未成功)

    • fitx Fitx全名是Fun Input Toy for Linux,Fitx的姐妹版Fun Input Toy, 是Mac OS X下最流行的输入法之一, 同时Fitx还为iPhone版本WeFIT提供强劲的输入引擎。Fitx的目标和FIT一样,旨在为Linux的用户提供流畅的输入体验。

    • SCIM-Python - A python language binding for SCIM

    • 手書き文字認識エンジン Tomoe


    有时间时读读Linux Internationalization HOWTO,关于日文的输入法设定可看Declan's Guide to Installing and Using Microsoft's Japanese IME



どうやってフォントをインストールしますか

LanguageSupport

水曜日, 2月 04, 2009

中国語のフォント

まず、中国語のフォント

  1. 文泉驿
  2. 中文字体-资源下载
  3. Free Chinese Fonts for Win9x/NT/2000/XP
  4. Simplified Chinese Unicode Fonts、More from Gallery of Unicode Fonts

ウェブ上の中国語辞典

  1. Dict.CN
  2. 辞洋
  3. 金山词霸在线词典
  4. 译典通网站
  5. 在线英语词典

よく使う日本語辞典
国語辞書 - エキサイト 辞書

LinuxのUSB起動

LinuxのUSB起動の作成方法
  1. CDの内容をUSBにコピー ⇒ isolinux.***のファイル名の"iso"の部分を"sys"に書き換える ⇒ syslinux -ma USBフラッシュメモリのドライブレター

  2. Run grubinst_gui ⇒ Copy grldr and menu.lst to the usb drive ⇒ Copy everything from CD to USB Flash Drive 詳細はGRUB for DOS めも

    install grub4dos, make usb bootable from windows
    1. download latest grub4dos here: http://download.gna.org/grub4dos/ and copy the extracted grldr and menu.lst to your usb flashdrive
    2. download grubutil for windows then extract all and run grubinst_gui.exe
    3. install

      1. Select from the menu 'Disk' and click 'Disk Refresh' then choose your usb device.
      2. Select 'Part List Refresh' and choose 'Whole Disk (MBR)'
      3. Click 'Install'




Create a Bootable VistaPE USB Hard Drive or Flashdrive

    Viのヘルプ

    Vimdoc : the online source for Vim documentation

    どこかからダウンロードしたもので、元のリンクが忘れてしまいました。



    Linux.com :: Vim tips: Using tabs and it's summary
    Linux.com :: Vim tips: Using Vim mappings and abbreviations



    Opening a tab
    vim -p file1 file2 file3 Open more than one file at startup using the -p option
    :set tabpagemax=15 Set the maxinum number of tabs

    :tabnew Open a new tab with an empty buffer
    :tabnew filename Edit a file in the new tab
    :tabf inver* Allow to search for a file in current path and open it in a new tab
    :next or :last Move to the files that are not displayed in a tab
    :tabs See what tabs are open
    Moving between tabs
    :tabn or :tabp Switch between tabs
    gt Switch between tabs in normal mode
    :tabfir(st) Jump to the first tab
    :tablast Jump to the last tab
    Rearranging tabs
    :tabm Move the current tab to the last spot
    :tabm n Move the tabs to a specific spot in the tab order
    Running command in tabs
    :tabdo %s/foo/bar/g Run a search and replace through all of the tabs at once


    Vimコマンド 覚書

    火曜日, 2月 03, 2009

    Grub4dos Guide

    GRUB4DOS专区
    Grub4dos Guide

    Grub4Dos Wiki
    1. Grub4dos tutorial
    2. Grub4dos安装和启动
    3. Grub4dos命令索引

    Delete MBR Code, using: FDISK /MBR
    It is very safe to write MBR directly using grubinst or bootlace(even to the wrong drives), because grubinst and bootlace will keep partition table untouched. But remember, you are to write MBR, so do not write to a partition by mistake.

    Backup Boot MBR, you have another chioce of doing this work in 3 steps(Note: this is a manual install using bootlace and an other disk capture utility):

    1. capture your MBR 64 sectors(63 sectors in the beginning track, plus one sector of your first partition) and save the file as MYMBR. If you do not intend to install MBR onto your USB drives, you may capture only 18 sectors of your harddisk for the MYMBR. You may save this file to another disk in case you would have your disk damaged.
    2. At the DOS prompt or in a Windows CMD box or under a Linux shell, type this command:

      bootlace.com MYMBR

      This will write the GRUB4DOS MBR onto the file MYMBR. You may check the content of this file and make sure the partition table in it not destroyed by bootlace.com.
    3. write back the MYMBR onto your original disk. Don't write to anthoer disk because the partition table will also update! Serious!!



    grub.exe(for running under DOS or other bootloaders like SYSLINUX or LILO)

    Both grldr and grub.exe are the grub4dos boot manager.
    bootlace.com, instead of grubinst_gui, can also be used to write MBR code.

    isolinux菜单转grub菜单,

    Boot directly to iso file in USB flash driver

    GNU GRUB Manual 0.97

    Damn Small Linuxインストール後の色々

    Damn Small Linuxインストール後色々な苦労をしなければなりません。
    Damn small Linux の限界を参考して進めていきたいと思います

    aptでProxyを利用する

    aptでProxyを利用する

    Debian GNU/Linuxの場合は /etc/apt/apt.conf にProxyを設定する。

    Acquire
    {
    http
    {
    Proxy "http://proxy.hoge.co.jp:8080";
    };
    ftp
    {
    Proxy "http://proxy.hoge.co.jp:8080";
    };
    }



    In case of PCLinuxOS, See apt-get proxy

    Well, there's three places I set the proxy on a new Linux install.



    1) in /etc/profile:

    Code:
    export http_proxy="http://user:pass@xxx.xxx.xxx.xxx:port/"
    export ftp_proxy="http://user:pass@xxx.xxx.xxx.xxx:port/"
    2) in /etc/apt/apt.conf

    Code:
    Acquire::http::Proxy "http://user:pass@xxx.xxx.xxx.xxx:port/";
    Acquire::ftp::Proxy "http://user:pass@xxx.xxx.xxx.xxx:port/";
    3) in /etc/wgetrc







    日曜日, 2月 01, 2009

    多合一小型Linux光盘下载及中文化说明

    多合一小型Linux光盘下载及中文化说明

    多合一小型Linux光盘

    硬盘安装及中文化Puppy Linux 4.0简要流程(シリーズⅡ)

    シリーズⅠに続いて、硬盘安装及中文化Puppy Linux 4.0简要流程

    硬盘安装及中文化Puppy Linux 4.0简要流程



    Puppy Linux 4.00 就是一个相当迷你的 Linux 操作系统(ISO不到88MB)但它自带了大量的描扫仪、打印机、数码相机的驱动以及音乐录制/编辑/转换软件。Puppy Linux 4.00 甚至还包含了一个完整的办公环境。Puppy Linux 4.00 并没有发布专门的中文版,要想用上中文版的 Puppy Linux 4.00 就需要自己动一下手。

    1. 硬盘安装Puppy Linux 4.0 英文版

    1.1. 下载Puppy Linux 4.00 英文版 ISO 文件(88MB)


    注意:在xp下安装puppy4更简单的方法是:下载Puppy2-installer for Windows XP,然后直接安装重启即可进入puppy linux系统。采取这个方法可省去以下1.2-1.4三个步骤。缺点是只能安装到C盘,要求C盘有较大可用空间。


    1.2. 下载Grub4dos


    下载 grub4dos后,把里面的grub.exe,grldr和menu.lst解压到C盘根目录下,修改C盘根目录下的BOOT.INI,增加以下启动项。


    复制内容到剪贴板


    代码:

    C:grldr="GRUB LOADER"


    1.3. 修改C:menu.lst文件,增加title Puppy Linux项等内容。
    可参照下面这个例子(安装在C盘)


    复制内容到剪贴板


    代码:

    title Puppy Linux
    kernel (hd0,0)/vmlinuz root=/dev/ram0 PMEDIA=idehd


    initrd (hd0,0)/initrd.gz


    注意:有空格,上面的(hd0,0)就是vmlinuz内核文件所在的分区地址,如果你是在d:abc那就应该这样了


    复制内容到剪贴板


    代码:

    kernel (hd0,4)/abc/vmlinuz root=/dev/ram0 PMEDIA=idehd
    initrd (hd0,4)/abc/initrd.gz


    这两条都需要改变,因为vmlinuz和initrd.gz放在同一个地方。
    1.4. 用winrar解开Puppy Linux iso文件,将initrd.gz,vmlinuz,pup_4xx.sfs,zdrv_4xx.sfs四个文件复制到FAT32格式磁盘根目录下(NTFS格式不认),如C盘或D盘。


    1.5. 重启,在出现Windows启动菜单时选择GRUB LOADER启动项。


    然后在Grub启动列表里选择Puppy Linux ——正常启动PuppyLinux,加载pup_save.2fs文件(如果有的话)。启动运行后,会进行初始配置选择:选择键盘,通常选第一个us就可以了。


    选择 X server。 puppy 自带了两种 X server 一个是 Xorg 另一个是 Xvesa。 Xvesa 比 Xorg 更小巧但功能相比也要少一些。建议这里还是选择"Xorg",如果“Xorg”测试不通过的话,再选择"Xvesa"(分辨率较低,但保证能进入图形介面)。


    选择显示器的分辨率和色彩的深度,这个根据自己的实际情况进行选择。配置完后,不一会就可以看到Puppy Linux 4.0 的桌面环境了。进入menu/setup/network wizard 或 pppoe设置,就可以在 Puppy Linux 4.0 里上网了。无线网卡在 Puppy Linux 4.0 中也能正常识别了。



    2. 安装中文支持包



    用于显示和输入汉字。



    3. 安装initrd补丁



    用于支持安装Puppy分区的中文文件名显示(这一步可选)。



    4. 安装中文支持附加包



    提供一些额外的中文字体和补丁,使系统更好的支持中文(这一步可选)。


    5. 安装最新中文化测试包0.0.4



    该测试包正在逐步完善之中,目前已对常用软件、右键菜单、及桌面图标进行了初步中文化,如发现bug或需要改进之处,请到http://puppy.cnbits.com发贴报告。



    6. 设置本地语言环境 locale



    点“menu->desktop->chooselocale country localisation”,弹出窗口上按“local”按钮。再弹出一个窗口,选择:zh_CN.utf8,点OK。



    7.重启puppy linux系统


    在关机前会有提示是否要保存会话,选yes,保存文件名为pup_save.2fs,大小建议为256M以上。

    寻找更多有关Puppy Linux中文化技术内容,可以去:


    中文Puppy Linux开发者之家: http://puppy.cnbits.com


    Puppy Linux中文化实验网站: https://sites.google.com/site/cnpuppy



    最后show一下中文化后的桌面:




    作者:sasaqqdan


    来源: OwnLinux 社区




    Damn Small Linux 安装中文

    Damn Small Linux 安装中文


    十分的复杂, 没有一定操作使用经验的很难实现

    下面是基本的操作步骤, 其中硬盘等参数根据你的实际情况来替换 切不可生硬照抄

    要点:

    1. 安装GNU命令套件,准备我们汉化过程中所需要的环境

    2. 安装 locale

    3. 安装中文输入法,及其他中文支持

    4. 设置环境变量

    << 复制CD中的内容到硬盘 >>
    --------------------------------------
    # mount /dev/hda3 /mnt/hda3

    # mount /dev/cdrom /mnt/cdrom
    # mkdir /mnt/hda3/newcd
    # mkdir /mnt/hda3/source
    # cp -Rp /mnt/cdrom/* /mnt/hda3/newce
    # cp -Rp /KNOPPIX/* /mnt/hda3/source
    # cp -Rp /KNOPPIX/.bash_profile /mnt/hda3/source/

    << 重导根目录系统 >>
    --------------------------------------
    # cd /mnt/hda3
    # mount --bind /dev source/dev
    # chroot source
    # mount -t proc /proc proc

    << 恢复 Debian 套件安装机制 >>

    ------------------------------------
    # dpkg-restore
    # vi /etc/apt/source.list
    :
    deb http://ftp.us.debian.org/debian/ stable main non-free contrib
    :

    # apt-get update

    << 安装 GNU 命令套件 >>
    ----------------------------------
    # wget http://distro.ibiblio.org/pub/linux/.../gnu-utils.dsl

    # tar xvfz gnu-utils.dsl

    << 脱离重导根目录系统 >>
    --------------------------------
    1. # umount /proc
    2. 按 Ctrl+D ( 跳出 chroot )
    3. # umount /dev

    << 重制 Live CD 主系统 >>
    -------------------------
    # mkisofs -R /mnt/hda3/source | create_compressed_fs - 65536 > /mnt/hda3/newcd/KNOPPIX/KNOPPIX


    << 重制 Live CD >>
    -----------------
    # cd /mnt/hda3/
    # mkisofs -no-pad -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin
    -c boot/isolinux/boot.cat -hide-rr-moved -o mydsl-1.2.1-CH.iso newcd


    使用刚刚得到的 mydsl-1.2.1-CH.iso 开机
    然后继续

    << 重建重制环境 >>
    -------------------------

    # mount /dev/hda3 /mnt/hda3
    # cd /mnt/hda3
    # rm -fr source
    # mkdir source
    # cp -Rp /KNOPPIX/* source/
    # cp -Rp /KNOPPIX/.bash_profile source/

    << 重导根目录 >>
    --------------------------------------
    # cd /mnt/hda3
    # mount --bind /dev source/dev
    # chroot source
    # mount -t proc /proc proc

    << 修改 /etc/locale.gen >>

    --------------------------------
    # vi /etc/locale.gen

    en_US ISO-8859-1
    zh_CN gbk

    (留下你需要的locale就可以了)

    << 安装 locale >>
    ------------------------
    # apt-get install locales

    查看系统支持的 locale
    # locale -a
    会列出系统支持的 locale


    << 安装中文字体 >>
    ------------------------
    # apt-get install xfonts-base (主要提供了gb16st, gb24st, gb16fs (就是16号、24号宋体和16号仿宋))
    # apt-get install xfonts-intl-chinese (rxvt-ml等包对它有依赖)

    << 安装中文输入法 >>
    # apt-get install fcitx (会占用33M空间,不过我们制作ISO的时候会将它占用的空间压缩到十几M)

    << X下的中文控制台 >>
    ----------------------------

    # apt-get install rxvt-ml (安装后系统中的crxvt-gb是X下的简体控制台,你可以修改fluxbox的menu文件,把其中的 rxvt 统统改为 crxvt-gb,)

    << 清除 APT 备份 >>
    # apt-get clean

    << 中文化设定>>
    -------------------------
    找一张简体的 KNOPPIX,在 KNOPPIX 中,将 /usr/X11R6/lib/X11/locale/ 下的
    zh_CN.gbk 文件夹复制到 DSL 系统相应的目录下

    << 修改环境变量 >>

    ---------------------------------------------------
    # vi /etc/skel/.bash_profile
    :
    export LC_ALL=zh_CN.gbk
    export XMODIFIERS="@im=fcitx"
    export IRCNICK=DSL
    :


    # vi /etc/skel/.xinitrc
    :
    enhance &>/dev/null & (因为DSL版本不同,如果找不到这句的话,就在Dillo 上面那行加 fcitx &)
    fcitx &

    :


    << 修改桌面图标 >>
    ----------------------------
    # vi /etc/skel/.xtdesktop/Xterm.lnk
    :
    Caption: XTerminal
    Command: sudo crxvt-gb -rv

    << 脱离重导根目录系统 >>
    --------------------------------
    1. # umount /proc

    2. 按 Ctrl+D ( 跳出 chroot )
    3. # umount /dev

    << 重制 Live CD 主系统 >>
    -------------------------
    # mkisofs -R /mnt/hda3/source | create_compressed_fs - 65536 > /mnt/hda3/newcd/KNOPPIX/KNOPPIX

    << 重制 Live CD >>
    -----------------
    # cd /mnt/hda3/
    # mkisofs -no-pad -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o mydsl-1.2.1-CH.iso newcd

    Bloggerの得意

    Advanced Use
    Video tutorials
    Google Help Centers
    Blogger Help
    Customize Your Blog


    Blogger の特殊機能

    Windows Free IDE

    ASM
    1. RadASM© Win32 assembly IDE for masm/tasm/fasm/nasm/goasm/hla.
    2. MASMPlus是一个使用纯 MASM 编写的 MASM Integrate Develop Environment.
    C
    1. Code::Blocks(Code::Blocks日本語化)
    2. Eclipse+CDT
    3. DEV CPP
    4. C-FREE
    5. LCC
    6. VC Series

    Resource editor(リソース(ダイアログ)エディタ雑感にランクが付けられたので、参考になります)
    1. ResEd Resource editor(ResEd V2.0.0.0 汉化版)
    2. ResEdit
    3. XN Resource Editor
    4. ResEditor

    Installer


    やや温め納豆
    そのブログ