December 2003 Archives

bootsplash 筆記

user-pic
Vote 0 Votes

/etc/rc.d/init.d/functions
initsplash()
. /etc/bootsplash/themes/$theme/config/bootsplash-`fbresolution`.cfg

開機畫面是放在 silentjpeg=

ref. bootsplash
http://pank.org/blog/archives/000035.html

FreeBSD netstart

user-pic
Vote 0 Votes

/etc/netstart 啟動網路相關設定及服務

gallery 調成 4x3

user-pic
Vote 0 Votes

修改 album.dat
"rows";s:1:"3";s:4:"cols";s:1:"4"
修改其中的 "3" "4"

hotkey 設定 in inittab

user-pic
Vote 0 Votes

ex.

kb::kbrequest:/sbin/shutdown -h now
in /etc/inittab, and

control alt keycode 79 = KeyboardSignal
control alt keycode 107 = KeyboardSignal

in their keymap. Now Ctrl-Alt-End will do a system shutdown

Magic SysRq key (linux 魔術鍵)

user-pic
Vote 0 Votes

Kernel hacking -> Magic SysRq key

press Alt+PrintScreen+?

/usr/src/linux/Documentation/sysrq.txt

enable
echo 0 > /proc/sys/kernel/sysrq

disable
echo 1 > /proc/sys/kernel/sysrq

* What are the 'command' keys?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'r' - Turns off keyboard raw mode and sets it to XLATE.

'k' - Secure Access Key (SAK) Kills all programs on the current virtual
console. NOTE: See important comments below in SAK section.

'b' - Will immediately reboot the system without syncing or unmounting
your disks.

'o' - Will shut your system off (if configured and supported).

's' - Will attempt to sync all mounted filesystems.

'u' - Will attempt to remount all mounted filesystems read-only.

'p' - Will dump the current registers and flags to your console.

't' - Will dump a list of current tasks and their information to your
console.

'm' - Will dump current memory info to your console.

'0'-'9' - Sets the console log level, controlling which kernel messages
will be printed to your console. ('0', for example would make
it so that only emergency messages like PANICs or OOPSes would
make it to your console.)

'e' - Send a SIGTERM to all processes, except for init.

'i' - Send a SIGKILL to all processes, except for init.

'l' - Send a SIGKILL to all processes, INCLUDING init. (Your system
will be non-functional after this.)

'h' - Will display help ( actually any other key than those listed
above will display help. but 'h' is easy to remember :-)

修改 X keyboard mapping

user-pic
Vote 0 Votes

ex.
xmodmap -e "keycode 22 = 5 percent"

console 遇亂碼還原方法

user-pic
Vote 0 Votes

當 console 變成一些如下面這樣的亂碼時

⎼⎺⎺├@├␊␌⎺␋▒ ␍┌

解決方法
# cat
ctrl-o
ctrl-d
ctrl-c

或是 setterm -reset

linux date set format

user-pic
Vote 0 Votes

date 122012301999.20 #將系統時間設為1999年12月20日12時30分20秒

NOKIA 手機看韌體版本

user-pic
Vote 0 Votes

*#0000#

#!/bin/sh
if [ -z $1 ] ; then
echo "Usage: `echo $0` {file}"
else
if [ -f $1 ] ; then
find *tgz \! -newer $1 -exec rm {} \;
else
echo File does not exist.
fi
fi

netsh set IP

user-pic
Vote 0 Votes

http://support.microsoft.com/default.aspx?scid=%2Fdirectory%2Fworldwide%2Fzh-tw%2Ffaq%2F6420.asp

DHCP
 
netsh interface ip set address "區域連線" dhcp
netsh interface ip set dns "區域連線" dhcp
netsh interface ip set Wins "區域連線" dhcp
 
Static IP
 
netsh interface ip set address "區域連線" static 10.0.0.9 255.0.0.0 10.0.0.1 1
netsh interface ip set dns "區域連線" static 10.0.0.9
netsh interface ip set Wins "區域連線" static 10.0.0.9

sample:

[C:\]type dhcp.bat
netsh interface ip set address "區域連線" dhcp
netsh interface ip set dns "區域連線" dhcp
netsh interface ip set wins "區域連線" dhcp

[C:\]type static.bat
netsh interface ip set address "區域連線" static 192.168.0.9 255.255.255.0 192.168.0.2 1
netsh interface ip set dns "區域連線" static 192.168.0.2

udhcpc

user-pic
Vote 0 Votes

http://routerlinux.com/docs/manual/man8/udhcpc.8.html

default lease time: 10days

javascript location

user-pic
Vote 0 Votes

For self:
location.href="whateva.htm";

For blank:
window.open="whateva.htm";

For parent:
parent.location.href="whateva.htm";

For top:
top.location.href="whateve.htm";

For SomeFrame:
parent.SomeFrame.location.href="whateva.htm";

Meta refresh can't target a frame

Problem: A meta refresh tag can't target a frame other than the current.

Workaround: Use a JavaScript timed location change.

Code Example: We have a frame named right. The delay is 3 seconds.


setTimeout("top.right.location = 'p.html'", 3000);


Note: Remember that top is a reserved word. So use names like upper and lower instead of top and bottom.

C/P 值

user-pic
Vote 0 Votes

Capability/Price

procmail 達成 bcc

user-pic
Vote 0 Votes

作者: pank (7/7的情人) 看板: BSD
標題: Re: 請問Procmail 可以設定所有信件自動備份一份給?…
時間: Sat Dec 6 15:56:06 2003

※ 引述《TerryLiaw.bbs@Terry.dragon2.net (早睡早起)》之銘言:
: ※ 引述《pank.bbs@77bbs.com (7/7的情人)》之銘言:
: > ※ 引述《"Lotus" , 看板: BSD》之銘言:
: > : 請教前輩 Procmail 可不可以設定為不管哪個USER收到信件 都直接會備份一份到
某個USER
: > : 請前輩提示 謝謝...
: > 設定 always_bcc 參數
: postfix 才有 always_bcc 可以用吧 ? :p

sorry, 把 procmail 看成 postfix :p

若是用 sendmail 搭配 procmail 備分到某信箱, 可以用

:0c
! user@elsewhere

這只能使用外部信箱, 不能使用本機帳號, 否則會有 loop 的情況發生

要備分到本機帳號, 需加一段 header 作 check, 以避免信件 loop

:0c
* ! ^X-Loop: check
| formail -A "X-Loop: check" | sendmail user

當信件第一次進到 procmail 的 rule, 沒有 "^X-Loop: check" 的話,
會上加去然後寄給 user, 第二次進到 procmail 的信(給 user 的),
由於有 "^X-Loop: check", 就不會再加 "X-Loop: check" 並寄給 user.

Tweak UI

user-pic
Vote 0 Votes

http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp

Taskbar and Start menu
Grouping 選第三個 Group any application with at least n windows
n 若設大一點, 相當於取消 Grouping 功能

好用的手機資料管理軟體

user-pic
Vote 0 Votes

http://www.oxygensoftware.com/download/
http://www.opm-2.com/download/OPM2.zip
可以把手機所有資訊包含通訊錄, 行事曆, 圖檔, 音樂 匯出匯入

系統工具

user-pic
Vote 0 Votes

http://www.sysinternals.com

batch file magic (website)

user-pic
Vote 0 Votes

http://www.robvanderwoude.com/

About this Archive

This page is an archive of entries from December 2003 listed from newest to oldest.

November 2003 is the previous archive.

January 2004 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives