"Bookmarks Synchonizer":http://update.mozilla.org/extensions/moreinfo.php?id=14 是一個日本人寫的 Firefox/Mozilla extension。它可利用 FTP, HTTP(S) 來把 Firefox 的 Bookmark 上傳到 FTP server,或者用 PUT 傳到某個 HTTP(S) 位置去;也可以從 FTP 或是用 GET 從 HTTP(S) 把 Bookmark 資料傳回來。

當你有好幾台電腦,想要同步 Bookmark 的時候,這個 extension 就太好用了。不過,因為自行架設 FTP server,多少會有一點安全性問題,如果能夠透過 HTTP(S),架一個 Apache 開使用者,再用 Auth 限制存取的帳號/密碼以及目錄位置,就可以更加安全了 (HTTPS 當然會比 HTTP 更理想)。

利用 "this article":http://extensionroom.mozdev.org/more-info/booksync#c53 裡的 perl script CGI,可以實作 Firefox Bookmarks Synchronizer 這個 Extension 的 HTTP 上下傳功能。
Posted by yungyuc at 21:03, 0 comment, 0 trackback.
是 "Tivoli":http://www-900.ibm.com/cn/software/tivoli/ 的廣告嗎?? 我也不知道 O_Oa

不過很好笑:"link":http://www.pconline.com.cn/pcedu/carton/mtv/0407/flash/29IloveIT.swf
Posted by yungyuc at 17:52, 0 comment, 0 trackback.
簡單說明一下安裝與操作:

1 Gnuplot package (1.7) 的安裝:

1 取得 "gnuplot-py-1.7.tar.gz":http://prdownloads.sourceforge.net/gnuplot-py/gnuplot-py-1.7.tar.gz?download 。

2 用 "winrar":http://www.rarlab.com/ 解開這個 tarball。

3 在解開來的目錄裡用 CLI (cmd.exe) 執行安裝 script::

python setup.py install

4 完成安裝。此時啟動 python,就可以匯入這個套件的功能::

from Gnuplot import Gnuplot

2 gnuplot 4.0 for windows 的安裝:

1 取得 "gp400win32.zip":http://prdownloads.sourceforge.net/gnuplot/gp400win32.zip?download 。

2 把該 .zip 內 gnuplot/bin 目錄內的檔案全部複製一份到 %SystemDrive%\bin (目錄自建),然後在 PATH 裡加一項 %SystemDrive%\bin。

3 完成安裝。此時就會可以使用 gnuplot 的操作視窗 (在 CLI 內下指令啟動)::

wgnuplot

3 測試 Gnuplot pacakge:

1 進入 python,匯入 Gnuplot

2 開啟一個 gnuplot 物件 (會出現一個與其關連的 gnuplot 控制視窗)::

g = Gnuplot()

3 執行繪圖動作 (會開啟一個繪圖視窗,包含了三個同在一條橫線上的點)::

g.plot([(0,2),(1,2),(2,2)])
Posted by yungyuc at 17:31, 0 comment, 0 trackback.
首先要安裝 py2exe 0.5.3,我們舉 dirtozip.py 這個 script 為例::

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
########################################################################
#
"""Project ``dirtozip''.
$Id: dirtozip.py,v 1.1 2004/09/23 22:25:41 yungyuc Exp $
自動展開 .rar, .zip 或目錄內的圖檔,再壓縮到 .zip 中。

由陳永昱 (yyc@seety.org) 開發測試
copyright 2004, All Rights Reserved.
"""
#
########################################################################

########################################################################
#
import sys, os
import string, re
from optparse import OptionParser, OptionGroup
from glob import glob
from tempfile import mkdtemp
from zipfile import ZipFile, ZIP_STORED
#
########################################################################

def archive( wdir, afn, \
exts=[ '[jJ][pP][gG]', \
'[jJ][pP][eE]', \
'[tT][iI][fF]', \
'[bB][mM][pP]', \
'[pP][nN][gG]', \
'[gG][iI][fF]' ] ):
########################################################################
#
zf = ZipFile( afn, 'w', ZIP_STORED )

olddir = os.getcwd()
os.chdir( wdir )

fns = []
for ext in exts:
fns.extend( glob('*.'+ext) )
fns.sort()
for fn in fns:
sys.stdout.write( "[%s] <- %s\n" % (afn, fn) )
zf.write( fn )
sys.stdout.write( "[%s] done.\n" % afn )
zf.close()

os.chdir( olddir )
#
########################################################################

def archive_all( containerdir, repositorydir="." ):
########################################################################
#
if os.path.exists( repositorydir ):
if not os.path.isdir( repositorydir ):
sys.stderr.write( "%s is not a directory, archive stopped.\n" % \
repositorydir )
return
else:
os.makedirs( repositorydir )

items = glob( os.path.join(containerdir, "*") )
for item in items:
if os.path.isdir(item):
archive( item, \
os.path.join( repositorydir, \
os.path.basename(item)+".zip" ) \
)
sys.stdout.write("\n")
#
########################################################################

def parameters():
########################################################################
#
op = OptionParser( \
usage="usage: %prog -f -d -a", \
version="%prog, $Revision: 1.1 $" )

opg = OptionGroup( op, "General Specifier" )
opg.add_option( "-f", "--filename", action="store", type="string", \
dest="afn", default="", \
help="Archive File Name." )
opg.add_option( "-d", "--directory", action="store", type="string", \
dest="dir", default="", \
help="Directory to save." )
opg.add_option( "-a", "--all", action="store_true", \
dest="all", default=False, \
help="Archive all directory specified by the -d option, "
"and use the place that -f option specified "
"to save the archive file(s).")
op.add_option_group( opg )

(options, args) = op.parse_args()

return options, args, op
#
########################################################################

def main():
########################################################################
#
# 解析命令列參數
options, args, op = parameters()

if options.dir != "":
if options.all:
if options.afn != "":
archive_all( options.dir, options.afn )
else:
archive_all( options.dir )
else:
if options.afn != "":
archive( options.dir, options.afn )
else:
archive( options.dir, os.path.basename(options.dir)+".zip" )
else:
op.print_help()
sys.exit()
#
########################################################################

if __name__ == '__main__':
########################################################################
#
main()
#
########################################################################

########################################################################
#
# $Log: dirtozip.py,v $
# Revision 1.1 2004/09/23 22:25:41 yungyuc
# 經過實用測試,已可用來進行工作。
#
########################################################################

用來建立 exe 檔的 dirtozip_setup.py 為::

#!/usr/bin/env python
# -*- coding: UTF-8 -*-

"""file revision: $Revision$
"""

########################################################################
#
from distutils.core import setup
import py2exe
#
########################################################################

setup( name = 'dirtozip',
version = '0.1',
description = 'Convert Images in Dir into a Zipfile',
author = 'Yung-Yu Chen',
author_email = 'yyc@seety.org',
py_modules = ['dirtozip'],
console = ['dirtozip.py'] )

# $Log$
#

準備好了這兩個檔案之後,把它們放在一起,然後在 CLI 下::

python dirtozip_setup py2exe

產生好的 .exe 檔和相關的 .dll 與程式庫,就會出現在 dist 目錄裡面了。
Posted by yungyuc at 17:31, 0 comment, 0 trackback.
在 /etc/init.d/zope 裡設定 TZ 環境變數::

export TZ="Hongkong"

即可把 Zope 的時區設為中原標準時間。TZ 如果寫成 "GMT+0800", "+0800" 等等,都會變成格林威治時間。如果寫成 "CST" 會變成美國時間。

注意,不要只用::

TZ="Hongkong"

因為服務啟動時會 fork 新的 process,沒有 export 的話是不能把設定傳下去的。
Posted by yungyuc at 17:30, 0 comment, 0 trackback.
tag on Computing
Book mark 一下

- "CFBSD":http://www.bsdconsulting.no/FreeBSD-CF.pdf

- "m0n0wall":http://m0n0.ch/wall/index.php
Posted by yungyuc at 17:12, 0 comment, 0 trackback.
Unicode 很方便,但用 VIM (6.1/6.2/6.3) 在正體中文環境下利用 set enc=utf8 編輯 Unicode 文檔時,如果目錄結構中有出現雙字元 (中文) 路徑,那下場會慘兮兮:文稿會因為路徑無法解讀而不能儲存。

幸好 VIM 有自動轉碼的功能,利用下面的指令來實作::

set fileencodings=utf-8,big5,gbk,sjis,euc-jp,euc-kr,utf-bom,iso8859-1
set encoding=big5
set termencoding=big5

termencoding 和 encoding 都設成 big5,而檔案依一定的順序嚐試解讀。目前這樣的設定會讓新建檔案都開成 utf8,同時允許 VIM 在不干擾系統路徑解讀的情況下 (encoding 還是 big5),轉換正/簡體中文、日文與韓文。

當然,在這種多語共存的情況下,最好把介面設成英文 (ASCII)::

lang en

免得在 set encoding=other than big5 的時候整個亂掉。

如果在 Linux/Un*x 下,看 locale 而定,如果像我一直用 utf8 的話,encoding 和 termencoding 也要改成 utf8 了。
Posted by yungyuc at 20:38, 0 comment, 0 trackback.
"Python for CJK":http://cjkpython.i18n.org/ ,包含有:

- CJKcodecs ("for windows":http://download.berlios.de/cjkpython/cjkcodecs-1.1.win32-py2.3.exe)

- iconvcodec ("for windows":http://download.berlios.de/cjkpython/iconvcodec-1.1.2.win32-py2.3.exe)

其中 CJKcodecs 我已經用過了,1.0.3 版不支援經 Unicode 補完計畫後產出的 Big5 假名,新版和 iconvcodec 未測試。

另外 "CJKPython":http://download.berlios.de/cjkpython/CJKPython2.3.4.exe 也挺有趣的。
Posted by yungyuc at 20:09, 0 comment, 0 trackback.

我收集了一些在 Windows 下的 CLI 工具,方便自己使用。主要有 cvs, ssh (cygwin), Unix 檔案工具, 程式開發工具 (make) 和 iconv,另外還有 mldonkey 的 Windows 版 connector g2gui 0.2.1/0.3。

利用這些工具,在 Windows 下可以比較方便地進行 CLI 作業。這些工具我打包放在這裡

Posted by yungyuc at 23:53, 1 comments, 0 trackback.
後藤圭二×門之園惠美×gimik !!!

太棒了呀~~~~

- "NT Hotnews":http://pc.webnt.jp/hotnews/hot_040930.html

- "Official Site":http://www.uta-kata.com/
Posted by yungyuc at 23:35, 0 comment, 1 trackbacks.
Change to page (10 entries in each page): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
© hover year to navigate month: powered by django