2008-01-28

7-Zip

http://www.7-zip.org/

[kw: compress]

2008-01-26

NTP/SNTP Tools

NetTime - Sourceforge.net
iTimeSync
Free Time Sync Software

NTP Configuration on Windows 2000 Workstation

NTP Configuration on Windows 2000 Workstation

Windows 2000 (Win2K) uses a time service, known as Windows Time Synchronization Service (Win32Time), to ensure that all Win2K computers on your network use a common time. The W32Time Service is a fully compliant implementation of the Simple Network Time Protocol (SNTP) as detailed in IETF RFC 1769. SNTP uses UDP port 123 by default. If you want to synchronize your time server with an SNTP server on the Internet, make sure that port is available.

  • Select a NTP server, using

net time /setsntp:swisstime.ethz.ch

  • Start the W32time service with

net start W32Time

You can also set the start option of the Windows Time Synchronization Service (W32Time) to Automatic, so the service will start when Windows/2000 starts.

Set the following Registry Entries for the W32Time Service (marked in blue color)

The registry values are located in the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

  • AvoidTimeSyncOnWan : REG_DWORD (optional)
    Prevents the computer from synchronizing with a computer that is in another site.
    0 = the site of the time source is ignored [default]
    1 = the computer does not synchronize with a time source that is in a different site

  • GetDcBackoffMaxTimes : REG_DWORD (optional)
    The maximum number of times to double the backoff interval when successive attempts to find a domain controller do not succeed. An event is logged every time a wait of the maximum length occurs.
    0 = the wait between successive attempts is always the minimum and no event is logged
    7 = [default]

  • GetDcBackoffMinutes : REG_DWORD (optional)
    The initial number of minutes to wait before looking for a domain controller if the last attempt did not succeed. 15 = [default]

  • LocalNTP : REG_DWORD
    Used to start the SNTP server.
    0 = do not start the SNTP server unless this computer is a domain controller[default]
    1 = always start the SNTP server

  • NtpServer : REG_SZ (swisstime.ethz.ch)
    NtpServer : REG_SZ (optional) Used to manually configure the time source. Set this to the DNS name or IP address of the NTP server to synchronize from. You can modify this from the command line by using the net time command. Value is blank by default

  • Period : REG_DWORD or REG_SZ
    Used to control how often the time service synchronizes. If a string value is specified, it must be one of special ones listed below.
    0 = once a day
    65535, "BiDaily" = once every 2 days
    65534, "Tridaily" = once every 3 days
    65533, "Weekly" = once every week (7 days)
    65532, "SpecialSkew" = once every 45 minutes until 3 good synchronizations occur, then once every 8 hours (3 per day) [default]
    65531, "DailySpecialSkew" = once every 45 minutes until 1 good synchronization occurs, then once every day
    freq = freq times per day

  • ReliableTimeSource : REG_DWORD (optional)
    Used to indicate that this computer has reliable time.
    0 = do not mark this computer as having reliable time [default]
    1 = mark this computer as having reliable time (this is only useful on a domain controller)

  • Type : REG_SZ
    Used to control how a computer synchronizes.
    Nt5DS = synchronize to domain hierarchy [default]
    NTP = synchronize to manually configured source
    NoSync = do not synchronize time

    The Nt5DS setting may not use a manual configured source.

The Adj and msSkewPerDay values are used to preserve information about the computer's clock between restarts. Do not manually edit these values.

2008-01-14

[Ubuntu 6.06] chown changes file permissions?

# ls -l foo.sh
-rwxr-xr-x 1 root root 23 2007-08-16 14:30 foo.sh
# chmod u+s foo.sh
# ls -l foo.sh
-rwsr-xr-x 1 root root 23 2007-08-16 14:30 foo.sh
# chown root:root foo.sh
# ls -l foo.sh
-rwxr-xr-x 1 root root 23 2007-08-16 14:30 foo.sh
# uname -a
Linux ubuntu 2.6.15-27-686 #1 SMP PREEMPT Sat Sep 16 02:13:27 UTC 2006 i686 GNU/Linux
#

Firefox 3b2 on Mac OS X

使用了 Firefox 3 Beta 2, 感觉还不错, 以前 google 时输入框内光标错位问题没有了, 速度也还可以, 期待 release 版 :-)

Fun Input Toy (FIT): 苹果输入法

去年尝试 fit 的时候好像还不很稳定, 没怎么敢用, 现在貌似强大了好多, 下载了 1.5.7 (for Tiger PPC) 版, 感觉不错的样子 :-) 不过以后可能会将重点放到 Leopard 的支持上, 但愿 Tiger 的版本也能继续维护.

2008-01-02

crypt() in PHP

crypt

(PHP 4, PHP 5)

crypt — One-way string encryption (hashing)

Description

string crypt ( string $str [, string $salt ] )

crypt() will return an encrypted string using the standard Unix DES-based encryption algorithm or alternative algorithms that may be available on the system.

Some operating systems support more than one type of encryption. In fact, sometimes the standard DES-based encryption is replaced by an MD5-based encryption algorithm. The encryption type is triggered by the salt argument. At install time, PHP determines the capabilities of the crypt function and will accept salts for other encryption types. If no salt is provided, PHP will auto-generate a standard two character salt by default, unless the default encryption type on the system is MD5, in which case a random MD5-compatible salt is generated. PHP sets a constant named CRYPT_SALT_LENGTH which tells you whether a regular two character salt applies to your system or the longer twelve character salt is applicable.

The standard DES-based encryption crypt() returns the salt as the first two characters of the output. It also only uses the first eight characters of str , so longer strings that start with the same eight characters will generate the same result (when the same salt is used).

On systems where the crypt() function supports multiple encryption types, the following constants are set to 0 or 1 depending on whether the given type is available:

  • CRYPT_STD_DES - Standard DES-based encryption with a two character salt
  • CRYPT_EXT_DES - Extended DES-based encryption with a nine character salt
  • CRYPT_MD5 - MD5 encryption with a twelve character salt starting with $1$
  • CRYPT_BLOWFISH - Blowfish encryption with a sixteen character salt starting with $2$ or $2a$

2007-12-29

Linux Initial RAD Disk (initrd)

initrd

[转] 苹果 Firefox 输入框缺字问题

【苹果】解决Firefox 1.5.0.2 mac版缺字的问题?

呃……今天不知道脑子进水了还是怎么回事……边看notes还边研究firefox的缺字问题……

Firefox 1.5版出来后,应该说在mac里缺字问题得到了相当程度的改善……网页已经基本能看了……

但是在网页输入框里还是会缺字……比方说,Google搜索工具栏里的输入框……一直很郁闷……但又不至于郁闷到偶去研究究竟如何解决……

呃……现在,大概是知道了……

  1. 在firefox preference-Content里将Default font选择为Hei。
  2. 在firefox.app(大家都是放application目录的吧?扩展名有可能被隐藏)这个文件上点右键,选择show Package contents。
  3. 进入Contents-MacOS-defaults-profile-chrome 目录
  4. 建立一个内容为:
    input{font-familly:Hei}
    textarea{font-family:Hei}
    名为userContent.css的文件。
  5. 保存,重启firefox。

中文缺字问题应该不会再出现了……不过……偶没有对日文、韩文等等其它文字做测试……但,即便这些文字缺字,也应该可以通过往userContent.css里两个font-familiy添加相应的字体名称搞定。

似乎选Hei并不是最理想的字体……
选 Times等别的什么会更好……
不懂了~

2007-12-28

Resolver Routines

res_init, res_query, res_search, res_querydomain, res_mkquery, res_send, dn_comp, dn_expand

[kw: DNS]

2007-12-17

《南方周末》新闻社区

《南方周末》新闻社区 12月13号上线
新版《南方周末》- www.infzm.com/enews/

2007-12-10

CMake Modules of KDE

svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs/cmake/modules

2007-11-29

[AutoIT] Network Programming

AutoItSetOption("TCPTimeout", 10000)

[keywords: tcp timeout tcprecv]

2007-11-12

Wikipedia Proxy

http://wikipedia.jaylee.cn/

Gladder - Firefox plugin used to access misc forbidden sites

2007-11-06

How to Add Support for a New Language to Exuberant Ctags

Add Support for New Languages to Ctags

Exuberant Ctags has been designed to make it very easy to add your own custom language parser. As an exercise, let us assume that I want to add support for my new language, Swine, the successor to Perl (i.e. Perl before Swine ). This language consists of simple definitions of labels in the form "def my_label". Let us now examine the various ways to do this.

Operational background

As ctags considers each file name, it tries to determine the language of the file by applying the following three tests in order: if the file extension has been mapped to a language, if the file name matches a shell pattern mapped to a language, and finally if the file is executable and its first line specifies an interpreter using the Unix-style "#!" specification (if supported on the platform). If a language was identified, the file is opened and then the appropriate language parser is called to operate on the currently open file. The parser parses through the file and whenever it finds some interesting token, calls a function to define a tag entry.

2007-10-31

ssldump

ssldump is an SSLv3/TLS network protocol analyzer. It identifies TCP connections on the chosen network interface and attempts to interpret them as SSLv3/TLS traffic. When it identifies SSLv3/TLS traffic, it decodes the records and displays them in a textual form to stdout. If provided with the appropriate keying material, it will also decrypt the connections and display the application data traffic.