Notes: 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

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

修改 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

#!/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

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.

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 功能

About this Archive

This page is an archive of entries in the Notes category from December 2003.

Notes: November 2003 is the previous archive.

Notes: January 2004 is the next archive.

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

Monthly Archives