2011年11月29日火曜日

vmware tools 安裝(升級)注意事項

安裝(升級) vmware tools 時
如果 kernel 有更新
編譯時會找不到對應的 header 路徑
造成無法編譯成功
這時要記得安裝對應的 header 即可
apt-get install linux-headers-`uname -r`

另外在虛擬機器安裝 vmware workstation 後
遇到執行後沒反應的情形
執行下列指令後即可
/usr/bin/vmware-config-tools.pl -m

2011年10月12日水曜日

Debian 編譯套件整理

使用 Debian Testing (Stable 有些新套件不支援)
bsnes:
apt-get install build-essential gcc-4.5 g++-4.5 libgtk2.0-dev libqt4-dev libsdl1.2-dev libpulse-dev libopenal-dev libao-dev libxv-dev

desmume:
apt-get install intltool libglade2-dev

wine:
apt-get install flex bison
apt-get install ia32-libs-dev libc6-dev-i386 lib32z1-dev //64bit Only

filezilla:
apt-get install libwxgtk2.8-dev libidn11-dev libgnutls-dev libtinyxml-dev libsqlite3-dev wx-common

truecrypt:
apt-get install nasm libfuse-dev

gimp:
apt-get install libbabl-0.0-0-dev libgegl-0.0-dev libtiff4-dev python2.6-dev python-gtk2-dev

vlc:
apt-get install liblua5.1-0-dev lua5.1 libmad0-dev libavcodec-dev libavformat-dev libswscale-dev libpostproc-dev liba52-0.7.4-dev libxcb-shm0-dev libxcb-xv0-dev libxcb-keysyms1-dev libxcb-randr0-dev libx11-xcb-dev libfribidi-dev libxpm-dev

firestarter:
apt-get install libgnome2-dev libgnomeui-dev

virtualbox:
apt-get install bin86 bcc iasl libxslt1-dev libcurl4-openssl-dev libxmu-dev
apt-get install linux-headers- //uname -r
apt-get install libcap-dev makeself
apt-get install libpam0g-dev g++-multilib texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-extra

2011年9月8日木曜日

RagAddress.ini 搜尋更新(2011-08-23aRagexe)

//2011-08-23aRagexe
//CharName=
//Search:esi, [ecx+12E8h]

sub_703680 proc near
push esi
lea esi, [ecx+12E8h]
push edi
mov ecx, 10h
mov edi, offset byte_87BEE0 //CharName=
rep movsd
mov ecx, off_7D64DC
mov esi, ecx
xor eax, eax
sub esi, offset byte_87BEE0 //CharName=
jmp short loc_7036B0
align 10h

loc_7036B0:
movzx edx, byte_87BEE0[esi+eax] //CharName=
xor byte_87BEE0[eax], dl
movzx edx, byte ptr [ecx+eax+1]
xor byte_87BEE1[eax], dl
movzx edx, byte ptr [ecx+eax+2]
xor byte_87BEE2[eax], dl
movzx edx, byte ptr [ecx+eax+3]
xor byte_87BEE3[eax], dl
add eax, 4
cmp eax, 40h
jb short loc_7036B0
pop edi
mov eax, offset byte_87BEE0
pop esi
retn
sub_703680 endp

align 10h

//Zeny=
//BaseExp=
//BaseExpNext=
//JobExp=
//JobExpNext=
//Search:mov ecx, [esp+58h+var_10]

loc_689B95:
mov [esp+6Ch+var_4], 0FFFFFFFFh
lea ecx, [esp+6Ch+var_2C]
call //此行有點問題 貼不上來
mov ecx, [esp+6Ch+var_C]
mov large fs:0, ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, [esp+58h+var_10]
xor ecx, esp
call sub_722AB8
add esp, 58h
retn 4
sub_6891C0 endp

off_689BC8 dd offset loc_68922F
dd offset loc_689253
dd offset loc_68926B
dd offset loc_689344
dd offset loc_68941D
dd offset loc_689459
dd offset loc_68946C
dd offset loc_68947F
dd offset loc_6894BA
dd offset loc_6896A2
dd offset loc_6896C3
dd offset loc_6896DB
dd offset loc_6896F3
dd offset loc_68970A
dd offset loc_689722
dd offset loc_68973A
dd offset loc_689751
dd offset loc_6898CE
dd offset loc_6899D0
dd offset loc_6899E8
dd offset loc_689A00
dd offset loc_689A17
dd offset loc_689A2F
dd offset loc_689A47
dd offset loc_689A5E
dd offset loc_689A76
dd offset loc_689A8E
dd offset loc_689AA5
dd offset loc_689ABD
dd offset loc_689AD5
dd offset loc_689AEC
dd offset loc_689B04
dd offset loc_689B19
dd offset loc_689327
dd offset loc_689B95
byte_689C54 db 0
db 2 dup(22h), 1
dd 5040302h, 8220706h, 0C0B0A09h, 220F0E0Dh
dd 22222222h, 22221110h, 3 dup(22222222h)
dd 14131222h, 18171615h, 1C1B1A19h, 201F1E1Dh
dd 22222222h, 498D21h
off_689C94 dd offset loc_689570
dd offset loc_6895AB
byte_689C9C db 0
align 10h
dword_689CA0 dd 0CC010101h, 3 dup(0CCCCCCCCh), 104EC81h
dd 0C0A10000h, 33007DCCh, 248489C4h, 100h
dd 24BC8B57h, 10Ch, 247B70Fh, 16F88348h
dd 0D5870Fh, 0B60F0000h, 689DE080h, 8524FF00h
dd 689DC8h, 18B9026Ah, 0E80087DDh, 55FFCh
dd 5D74C085h, 5304478Bh, 0FCAC1D8Bh, 8B560087h
dd 85F32BF0h, 854874C0h, 554474F6h, 0FCB82D8Bh
dd 0C88B0087h, 0C32BC58Bh, 50FEF799h, 0CB2B5155h
dd 244C8D51h, 6C886820h, 0FF510078h, 75637815h
dd 18C48300h, 6A006Ah, 0F51EF568h, 24548D00h
dd 16A521Ch, 819078B9h, 5EDEE800h, 5E5DFFE9h
dd 4478B5Bh, 87FCACA3h, 8B46EB00h, 0D89044Fh //BaseExp=87F***
dd 87FD68h, 0B9833BEBh, 11Ch, 0C7147400h //JobExp=87F***
dd 11C81h, 0
add byte ptr dword_87DD18[ecx], bh
call sub_6F1A70
mov edx, [edi+4]
mov dword_87FD54, edx //Zeny=
jmp short loc_689DA5

loc_689D92:
mov eax, [edi+4]
mov dword_87FCB8, eax //BaseExpNext=
jmp short loc_689DA5

loc_689D9C:
mov ecx, [edi+4]
mov dword_87FD64, ecx //JobExpNext=


//Weight=
//WeightMax=
//Search:; "Weight : %3d / %3d"

loc_494BB4:  ; "Weight : %3d / %3d"
push offset aWeight3d3d

loc_494BB9:  ; char *
push edx
call ebx ; sprintf
mov eax, dword_8797C0 //WeightMax=
add esp, 10h
xor edi, edi
cmp eax, 1
mov ecx, eax
jg short loc_494BD2
mov ecx, 1

loc_494BD2:
mov eax, dword_8797CC //Weight=
imul eax, 64h
cdq
idiv ecx
cmp eax, 32h
jl short loc_494BE7
mov edi, 0FFh

//BaseLv=
//JobLv=
//Search:; "Base Lv. %d"
//Search:; "Job Lv. %d"

loc_494A8B:
mov eax, dword_879710 //BaseLv=
push eax
push offset aBaseLv_D ; "Base Lv. %d"
lea ecx, [esp+2Ch]
push ecx  ; char *

loc_494ADB:
mov eax, dword_87971C //JobLv=
push eax
push offset aJobLv_D ; "Job Lv. %d"
lea ecx, [esp+2Ch]
push ecx  ; char *

//HPIndex=
//MaxHPTable=
//Search:
HPIndex & MaxHPTable 似乎是無解
使用 WinHex 和之前版本比較 似乎整個被拿掉了
不過 這 2 個並不影響 Exp 效率的計算
只是不能自動喝水了

2011年7月29日金曜日

Comodo Internet Security 防火牆設定

Xmanager:
http://www.netsarang.com/faq/xmanager/3160/title
根據這個 FAQ 必需開啟以下 PORT
TCP(IN) : 6000~6010 16001(GNOME)
UDP(OUT) : 177

首先把 Xmanager 的主程式加入信任程式
開啟 CIS 後 選 Firewall 的部份
按 Define a New Trusted Application 把主程式加入(Select -> Browse...)
然後在 Network Security Policy 裡 找到 Xmanager
按右鍵 選擇 Edit
這時 Network Access Rules 應該是 Use a Custom Policy
規則裡會有一個 Allow All Requests
按左下角的 Add... 來加入我們需要的規則
UDP(OUT) :
Action: -> Allow
Protocol: -> UDP
Direction: -> Out
Destination Port -> Type: -> A Single Port
Port: -> 177
TCP(IN) :
這邊因為要開啟的 PORT 比較多
所以 先到 Network Security Policy 裡的 Port Sets
按 ADD... -> A New Port Set... 名字我輸入 XDMCP
然後 XDMCP 按右鍵 選 Add...
A Single Port -> 16001
A port range -> 6000 - 6010
完成這些後
按照 UDP(OUT) 的方法加入規則
Action: -> Allow
Protocol: -> TCP
Direction: -> In
Source Port -> Type: -> A Set of Ports
Ports: -> XDMCP
這樣就設定完成

開啟 PORT 113 (巴哈姆特):
Network Security Policy 裡按 Add...(記得先取消選擇程式 不然只是在那個程式內加規則)
Application Path: Select -> Running Processes
選擇 Windows Operating System
然後加入兩個規則
Action: -> Allow
Protocol: -> TCP
Direction: -> Out
Destination Address -> Type: -> IPv4 Single Address
IP: -> 60.199.217.88
Source Port -> Type: -> A Single Port
Port: -> 113

Action: -> Allow
Protocol: -> TCP
Direction: -> In
Source Address -> Type: -> IPv4 Single Address
IP: -> 60.199.217.88
Destination Port -> Type: -> A Single Port
Port: -> 113
這樣子就設定完成

附註: 60.199.217.88 這個是巴哈姆特的 IP 如果將來有更改的話 也要隨之變更
參考資料: http://webbbs.gamer.com.tw/readPost.php?brd=protect_PC&p=1579&x=A15V6QCM

2011年6月16日木曜日

Debian 開機問題

版本 : debian-6.0.1a-i386-DVD-1.iso
安裝完後 更新成 testing
開機時 有時會出現這問題 重開機就會正常(次數不定)

2011年6月8日水曜日

RO 配點整理(官服調整版)

[2012/07/27 Update]
Arc Bishop
STR 1 ; AGI 82 ; VIT 95 ; INT 82 ; DEX 84 ; LUK 100
(JOB50加成值:STR+5、AGI+4、VIT+5、INT+8、DEX+6、LUK+0)
http://uniuni.dfz.jp/skill4/acb.html?20gXdNsXdAhFbqroqnqEHnjScAkBabkbdsrEoscHcY
http://uniuni.dfz.jp/skill4/acb.html?20gXdNsXdAhEbdlbqnkeHnjN1kBabkbdsrEoscHcY (Baby)


Sorcerer
STR 1 ; AGI 84 ; VIT 95 ; INT 120 ; DEX 83 ; LUK 1
(JOB50加成值:STR+3、AGI+3、VIT+5、INT+10、DEX+7、LUK+3)
http://uniuni.dfz.jp/skill4/soe.html?10qoAnfkeKcoebaFrEkElarAjNabdnafrAbslfhqaAdn1cHcY


Warlock
STR 1 ; AGI 82 ; VIT 96 ; INT 120 ; DEX 84 ; LUK 1
(JOB50加成值:STR+1、AGI+5、VIT+4、INT+11、DEX+6、LUK+1)
http://uniuni.dfz.jp/skill4/wlk.html?10qneAoXfkdDcBHneKgKcAapdAeAbsbsaOefqocHcY


Wanderer
STR 1 ; AGI 82 ; VIT 95 ; INT 82 ; DEX 84 ; LUK 100
(JOB50加成值:STR+2、AGI+8、VIT+5、INT+8、DEX+6、LUK+0)
http://uniuni.dfz.jp/skill4/wan.html?10FXJkrAJkGO2b2nbxrA2orA6kwY


Soul Linker
STR 90 ; AGI 83 ; VIT 44 ; INT 1 ; DEX 38 ; LUK 1
(JOB50加成值:STR+0、AGI+0、VIT+6、INT+12、DEX+12、LUK+0)
http://uniuni.dfz.jp/skill4/slk.html?10GA3fhyhqndndnasdA1bQ4k


Genetic
STR 99 ; AGI 1 ; VIT 1 ; INT 99 ; DEX 1 ; LUK 1
(JOB50加成值:STR+1、AGI+5、VIT+4、INT+11、DEX+6、LUK+1)
http://uniuni.dfz.jp/skill4/gnt.html?10JbGKAfuSrArFqBdsGA91In


Glt. Cross
STR 110 ; AGI 110 ; VIT 95 ; INT 1 ; DEX 73 ; LUK 1
(JOB50加成值:STR+6、AGI+7、VIT+5、INT+4、DEX+7、LUK+0)
http://uniuni.dfz.jp/skill4/glx.html?10GXjkIbHNsNboGS1cBqA2fakwY

2011年5月17日火曜日

AHK(RO 自動 Encore & Frost Misty & Jack Frost ; 可背景執行 目前只適合單視窗)

[2011/05/18 Update]
Encore:
Pause //暫停
IfWinExist,Ragnarok //檢查 RO 視窗是否存在
{
Loop //迴圈
{
 Loop,4 //迴圈 4 次
 {
 IfWinActive,Ragnarok //如果選擇的視窗是 RO
 {
  Send {F4} //送出按鍵(可以變更)
 }
 IfWinNotActive,Ragnarok //如果選擇的視窗不是 RO(背景執行用)
 {
  ControlSend,,{F4},Ragnarok //背景送出按鍵給 RO(可以變更)
 }
 Sleep, 250 //停止 0.25 秒
 }
 Sleep, 180000 //停止 180 秒
 Sleep, 5000 //停止 5秒
}
}
^Home::Pause //設定 Ctrl+Home 暫停 or 關閉暫停
^End::Reload //設定 Ctrl+End 重置(重置後 預設是暫停 要按 Ctrl+Home 開始)
             //使用暫停並不會使 Sleep 的計時重置 故加入此鍵
             //沒有先使用詩舞技能就使用 Encore 的話 會沒反應 此時也必需重置
Frost Misty & Jack Frost:
Pause
IfWinExist,Ragnarok
{
Loop
{
 Loop,2 //送 2 次是怕 LAG(約 1~3 次 JF 會 1次 FM)
 {
 IfWinActive,Ragnarok
 {
  Send {F7} //Frost Misty
 }
 IfWinNotActive,Ragnarok
 {
  ControlSend,,{F7},Ragnarok //建議使用 F1~F9(背景執行時 比較不會有問題)
 }
 Sleep, 250
 }
 Loop,2 //送 2 次是怕 LAG(約 1~3 次 JF 會 1次 FM)
 {
 IfWinActive,Ragnarok
 {
  Send {F9} //Jack Frost
 }
 IfWinNotActive,Ragnarok
 {
  ControlSend,,{F9},Ragnarok //建議使用 F1~F9(背景執行時 比較不會有問題)
 }
 Sleep, 250
 }
}
}
^Home::Pause
^End::Reload
官網:http://www.autohotkey.com/
複制上面的程式碼
然後用 AutoHotKey 編譯即可使用

2011年5月14日土曜日

Flash Player 10.3 (Debian)

10.3 版似乎沒有提供 deb 安裝檔
下載 (.tar.gz) 版本
解壓縮後 把 libflashplayer.so 複制到 /usr/lib/mozilla/plugins 即可(使用 Firefox 4)

裡面有附設定程式 安裝測試後
個人覺得似乎不需要安裝(需要的話 可以參考內附的說明檔安裝)

要注意的是 有安裝其它版的話
在 Firefox 的設定裡要將它關閉
不然似乎會使用舊版的播放

2011年5月10日火曜日

Debian 圖形遠端連線

vim /etc/gdm3/daemon.conf // 在 xdmcp 下加入 Enable=true 即可
/*
[xdmcp]
Enable=true
*/

目前是使用這套 XWinLogon Windows X Server (Windows)
官網 : http://www.calcmaster.net/visual-c++/xwinlogon/
不過 畫面上的效能還不是很理想
做一些簡單的設定是沒問題
所以還是使用 ssh 比較多

2011年5月9日月曜日

IDA Pro 簡易教學

使用軟體 : IDA Pro 5.0 Freeware Version
官網 : http://www.hex-rays.com/
主程式
開啟檔案(選 Portable 其它使用預設值就好)
載入程式中 需要其它的 DLL(可以略過 按 Cancel)
這邊按 Yes(這邊我不知道怎麼解釋比較好 照預設選 Yes 就好)
等待分析完成後
File -> Product file -> Create ASM File... ALT+F10
這個是分析還沒完成就選輸出的情形 請按 No 等待分析完成
(這邊要等約 10~15 分)
分析完成
正在輸出

使用這個軟體
所得到的 ASM 檔
能用來搜尋 RagAddress.ini 所需要的位址

2011年5月7日土曜日

RagAddress.ini 教學(使用 IDA PRO)

[2011/10/30 Update]
//2011-10-19aRagexe
//CharName=
//Search:esi, [ecx+12E8h]

sub_703680 proc near
push esi
lea esi, [ecx+12E8h]
push edi
mov ecx, 10h
mov edi, offset byte_87BEE0 //CharName=
rep movsd
mov ecx, off_7D64DC
mov esi, ecx
xor eax, eax
sub esi, offset byte_87BEE0 //CharName=
jmp short loc_7036B0
align 10h

loc_7036B0:
movzx edx, byte_87BEE0[esi+eax] //CharName=
xor byte_87BEE0[eax], dl
movzx edx, byte ptr [ecx+eax+1]
xor byte_87BEE1[eax], dl
movzx edx, byte ptr [ecx+eax+2]
xor byte_87BEE2[eax], dl
movzx edx, byte ptr [ecx+eax+3]
xor byte_87BEE3[eax], dl
add eax, 4
cmp eax, 40h
jb short loc_7036B0
pop edi
mov eax, offset byte_87BEE0
pop esi
retn
sub_703680 endp

align 10h

//Zeny=
//BaseExp=
//BaseExpNext=
//JobExp=
//JobExpNext=
//Search:mov ecx, [esp+58h+var_10]

loc_691EB9:
mov [esp+6Ch+var_4], 0FFFFFFFFh
lea ecx, [esp+6Ch+var_2C]
call ds: //此行過長省略
mov ecx, [esp+6Ch+var_C]
mov large fs:0, ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, [esp+58h+var_10]
xor ecx, esp
call sub_72D078
add esp, 58h
retn 4
sub_6914E0 endp

off_691EEC dd offset loc_69154F
dd offset loc_691573
dd offset loc_69158B
dd offset loc_691668
dd offset loc_691741
dd offset loc_69177D
dd offset loc_691790
dd offset loc_6917A3
dd offset loc_6917DE
dd offset loc_6919C6
dd offset loc_6919E7
dd offset loc_6919FF
dd offset loc_691A17
dd offset loc_691A2E
dd offset loc_691A46
dd offset loc_691A5E
dd offset loc_691A75
dd offset loc_691BF2
dd offset loc_691CF4
dd offset loc_691D0C
dd offset loc_691D24
dd offset loc_691D3B
dd offset loc_691D53
dd offset loc_691D6B
dd offset loc_691D82
dd offset loc_691D9A
dd offset loc_691DB2
dd offset loc_691DC9
dd offset loc_691DE1
dd offset loc_691DF9
dd offset loc_691E10
dd offset loc_691E28
dd offset loc_691E3D
dd offset loc_69164B
dd offset loc_691EB9
byte_691F78 db 0
db 2 dup(22h), 1
dd 5040302h, 8220706h, 0C0B0A09h, 220F0E0Dh
dd 22222222h, 22221110h, 3 dup(22222222h)
dd 14131222h, 18171615h, 1C1B1A19h, 201F1E1Dh
dd 22222222h, 498D21h
off_691FB8 dd offset loc_691894
dd offset loc_6918CF
byte_691FC0 db 0
align 4
dd 0CC010101h, 2 dup(0CCCCCCCCh)



sub_691FD0 proc near

var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub esp, 104h
mov eax, dword_7EA140
xor eax, esp
mov [esp+104h+var_4], eax
push edi
mov edi, [esp+108h+arg_0]
movzx eax, word ptr [edi+2]
dec eax
cmp eax, 16h
ja loc_6920CF
movzx eax, ds:byte_692100[eax]
jmp ds:off_6920E8[eax*4]

loc_692008:
push 2
mov ecx, offset dword_88B1C0
call sub_6EA150
test eax, eax
jz short loc_692075
mov eax, [edi+4]
push ebx
mov ebx, dword_88D0F4
push esi
mov esi, eax
sub esi, ebx
test eax, eax
jz short loc_692073
test esi, esi
jz short loc_692073
push ebp
mov ebp, dword_88D100
mov ecx, eax
mov eax, ebp
sub eax, ebx
cdq
idiv esi
push eax
push ebp
push ecx
sub ecx, ebx
push ecx
lea ecx, [esp+124h+var_104]
push offset aDDDMoreD ; "%d : %d/%d More : %d"
push ecx  ; char *
call ds:sprintf
add esp, 18h
push 0
push 0
push 0F51EF5h
lea edx, [esp+120h+var_104]
push edx
push 1
mov ecx, offset unk_8264F8
call sub_5213D0
pop ebp

loc_692073:
pop esi
pop ebx

loc_692075:
mov eax, [edi+4]
mov dword_88D0F4, eax //BaseExp=
jmp short loc_6920C5

loc_69207F:
mov ecx, [edi+4]
mov dword_88D1B0, ecx //JobExp=
jmp short loc_6920C5

loc_69208A:
cmp dword ptr [ecx+11Ch], 0
jz short loc_6920A7
mov dword ptr [ecx+11Ch], 0
mov ecx, offset dword_88B1C0
call sub_6FC280

loc_6920A7:
mov edx, [edi+4]
mov dword_88D19C, edx //Zeny=
jmp short loc_6920C5

loc_6920B2:
mov eax, [edi+4]
mov dword_88D100, eax //BaseExpNext=
jmp short loc_6920C5

loc_6920BC:
mov ecx, [edi+4]
mov dword_88D1AC, ecx //JobExpNext=

//Weight=
//WeightMax=
//Search:; "Weight : %3d / %3d"

loc_494BB4:  ; "Weight : %3d / %3d"
push offset aWeight3d3d

loc_494BB9:  ; char *
push edx
call ebx ; sprintf
mov eax, dword_8797C0 //WeightMax=
add esp, 10h
xor edi, edi
cmp eax, 1
mov ecx, eax
jg short loc_494BD2
mov ecx, 1

loc_494BD2:
mov eax, dword_8797CC //Weight=
imul eax, 64h
cdq
idiv ecx
cmp eax, 32h
jl short loc_494BE7
mov edi, 0FFh

//BaseLv=
//JobLv=
//Search:; "Base Lv. %d"
//Search:; "Job Lv. %d"

loc_494A8B:
mov eax, dword_879710 //BaseLv=
push eax
push offset aBaseLv_D ; "Base Lv. %d"
lea ecx, [esp+2Ch]
push ecx  ; char *

loc_494ADB:
mov eax, dword_87971C //JobLv=
push eax
push offset aJobLv_D ; "Job Lv. %d"
lea ecx, [esp+2Ch]
push ecx  ; char *

//HPIndex=
//MaxHPTable=
//Search:

2011年5月6日金曜日

PuTTY 設定

[2011/05/10 Update]
設定字型(挑喜歡的 不過好像只能設等寬字型)
設定編碼(比較常用 UTF-8)
設定保持連線(設10)

由於 PuTTY 沒有內建 Tab 功能
所以找了 PuTTY Connection Manager 來實現 Tab 的功能
另外 建議關閉它的 HotKeys 功能 或是手動關閉會衝突的(Tools -> Options)
之前使用 VIM 結果 預設值會影響使用 就直接把它關閉
官網:
http://sourceforge.net/projects/puttycm/
http://puttycm.sourceforge.net/
下載點:
http://sourceforge.net/projects/puttycm/reviews/
這邊很奇妙 它的下載點不在 Files 反而在 Reviews 裡 不知道為啥
PuTTY 的官網:
http://www.chiark.greenend.org.uk/~sgtatham/putty/

2011年4月21日木曜日

samba 設定

[2011/04/26 Update]
分享:
apt-get install samba //安裝 samba(安裝時會設定工作群組)
dpkg -i *.deb //安裝 gadmin-samba(用這個來設定 samba)偷懶XD
configuration //設定下面這些
/*
netbios name = Samba24 //主機名稱
workgroup = Workgroup //工作群組
hosts allow = 127. 192.168.0. //允許的來源的連線 IP
interfaces = 127.0.0.1/8 192.168.0.0/24 //選擇連線的網路卡 IP
remote announce = 192.168.0.255 //空白即可
remote browse sync = 192.168.0.255 //空白即可
*/
設定完後 記得設定使用者名稱和密碼
讀取:
Nautilus -> ^L -> "smb://192.168.*.*" //讀取 Windows 機器下分享的目錄(使用 IP 比較好)
參考資料:
http://wiki.debian.org.hk/w/Access_Windows_share
http://wiki.debian.org.hk/w/Share_directory_to_Windows_machine
http://packages.debian.org/en/squeeze/gadmin-samba

2011年4月20日水曜日

螢幕維修LIVE(?

2011_0419-1730 //VH226C 開機不能 有電流聲和電子零件毀損聲
2011_0420-1030 //打完客服電話 等下午快遞來收件
          1240 //中午就來收走了
2011_0423 //快遞寄回來
測試後 目前使用沒問題

2011年4月15日金曜日

DOSBox 設定

Linux:
CONFIG -writeconf /home/username/dosbox.conf //Linux 版預設不會寫入設定檔

Windows:
C:\Users\username\AppData\Local\DOSBox\dosbox-0.74.conf //版本號碼可能會變動

HotKey:
^F4 //HOST 變更 DOSBox mount 的目錄檔案時 可以按這個重新讀取
^F10 //解除滑鼠鎖定(在 DOSBox 的視窗)

指令:
mount x path //x=磁碟機代號 ; path=指定的路徑
mount x path -t cdrom//模擬成光碟機(Windows 下建議用這個 配合虛擬光碟比較方便)
imgmount x path -t iso//指定 iso 檔模擬成光碟機(Linux 下 用這個 有 CD 音軌時比較完美)
                      //只支援 ISO , CUE/BIN 其它的似乎不行
參考資料
http://www.dosbox.com/wiki/CONFIG
http://www.dosbox.com/wiki/MOUNT
#19AhlY98 (Emulator) [ptt.cc]

2011年4月3日日曜日

wine 設定語系執行

dpkg-reconfigure locales //得先增加欲執行的語系 不然會錯誤
env LC_ALL=ja_JP.UTF-8 wine //執行的 Windows 程式

2011年3月23日水曜日

Mozilla Firefox 設定

about:config -> app.update.enabled -> false
                browser.startup.homepage -> about:config
                browser.startup.page -> 0
                browser.tabs.autoHide -> true
                browser.tabs.closeWindowWithLastTab -> false
                signon.rememberSignons -> false
                New -> Boolean -> extensions.checkCompatibility.4.0 -> false
參考網址:
http://www.mydigitallife.info/2011/03/14/disable-add-ons-plugin-and-extension-compatibility-check-in-firefox-4/

2011年3月10日木曜日

debian 6 安裝 vmware tools

vmware workstation 7.1.3 的 debian 6 上 安裝 vmware tools 的前置工作
uname -r (使用這個看安裝的 linux-headers-版本號碼)
apt-get install gcc-4.3 make linux-headers-2.6.32-5-686
apt-get install gcc-4.3 make linux-headers-2.6.32-5-amd64

2011年3月9日水曜日

vmware 錯誤訊息(停電後重新啟動)

理由:ファイルをロックできませんでした。

解決方法:
刪除下列這些類似目錄
*.vmdk.lck
*.vmem.lck

然後重新啟動即可

早上起床停電了 其中一台vm有這個情形(睡覺前只開2台)

參考連結:
http://plaza.rakuten.co.jp/nyokkinyoki/diary/200901160000/

2011年3月7日月曜日

vmware workstation 7.1.3 with windows 7 sp1(dynamic memory)

錯誤訊息:
Resolving the error: The virtual machine is unable to reserve memory
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1014955

解決方法:(參考這 2 個網址)
http://communities.vmware.com/thread/303466?start=45&tstart=0
http://www.techhead.co.uk/fix-poor-vm-performance-errors-with-vmware-workstation-7-1-3-after-applying-microsoft-windows-7-sp1
C:\ProgramData\VMware\VMware Workstation\config.ini
vmmon.disableHostParameters = "TRUE"
加入上面這行 然後"重開機"即可

問題原因:
似乎是 windows 7 sp1 和 windows server 2008 r2 sp1 新功能的 dynamic memory 所造成的

實測:
目前同時開 5 台 vm 實測沒問題(1G ram vm * 5 ; host 8G ram win7sp1)
之前 ws2008r2 sp1 開機黑屏+延遲的問題似乎也沒了
應該之後的版本會修正這個問題

2011年3月6日日曜日

firefox & thunderbird 錯誤訊息

./firefox-bin: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
./thunderbird-bin: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

./firefox-bin: error while loading shared libraries: libgtk-x11-2.0.so.0: wrong ELF class: ELFCLASS64
./thunderbird-bin: error while loading shared libraries: libgtk-x11-2.0.so.0: wrong ELF class: ELFCLASS64

解決方式:
裝了 ia32-libs-gtk 後就能正常跑官方的 firefox 和 thunderbird
但是 flash 和 java 都有問題 用之前文章的是沒問題

2011年3月1日火曜日

libreoffice64 在 debian64 上不能執行的解決辦法

[2011/03/29 Update]
新版的 3.3.2 已經沒有問題(只有 lenny 64 會需要下面的解法)

每次執行時 視窗會跑一半就跳掉了
用 terminal 執行 libreoffice 會有下列錯誤訊息
/opt/libreoffice/program/soffice.bin: symbol lookup error: /opt/libreoffice/basis3.3/program/libcairo.so.2: undefined symbol: pixman_region32_init

執行下列這行
cp /usr/lib/libcairo.so.2 /opt/libreoffice/basis3.3/program

cd /opt/libreoffice/basis3.3/program
ln -s /usr/lib/libcairo.so.2
如果檔案已經存在就把它改名就好

Debian 6 沒有這問題 不過啟動時間有點久 還不知道為什麼

2011年2月22日火曜日

單一網路卡(DHCP+NAT)設定修改

使用實體網路卡(PPPOE)+虛擬網路卡(DHCP)
dhcpd.conf 的寫法沒有改變(參考前篇)
不過這樣改的話
防火牆流量顯示都會集中顯示在 eth0
不知道算不算缺點
要注意的是 pppoeconf 設定時
選擇的網路卡要注意一下
設成 DHCP 的網路卡 可能會讓防火牆錯誤(沒試過就是)
vim /etc/network/interfaces
/*
auto eth0
iface eth0 inet static
address 192.168.10.50
netmask 255.255.255.0

auto eth0:0 //虛擬的網卡(之前兩張網路卡時是設 eth1)
iface eth0:0 inet static //這行的 eth 也要改
address 192.168.10.254
netmask 255.255.255.0
*/
/etc/init.d/networking restart //重新啟動網路
vim /etc/default/dhcp3-server //INTERFACES="eth0" eth0:0 還是算 eth0 的部份(應該XD)
                              //之前兩張網路卡時是設 eth1

2011年2月18日金曜日

vim 筆記

[2011/04/08 Update]
: //cmd
esc //normal mode
h,j,k,l //left , down , up , right
i,I //insert mode ; i = 遊標左邊 ; I = 行首
a,A //insert mode ; a = 遊標右邊 ; A = 行末
o,O //insert mode 插入一行空白 ; o = 遊標所在位置下一行 ; O = 遊標所在位置
r,R //r = 取代字元 ; R= replace mode
x,X //x = delete ; X = backspace
d,D(c,C) //dd = 刪除整行 ; D = 刪除現在字元到行末
         //d(h,l) = 刪左邊字元 , 刪右邊字元
         //d(j,k) = 刪整行到上一行 , 刪整行到下一行
         //c,C 功能相同 但刪完會進入 insert mode
0,$,^ //行首 , 行末 , 行首(不包括空白)
gg,G //檔案開始,檔案結束
w,W,e,E,b,B //w 單字字首(往下找)
            //e 單字字尾(往下找)
            //b 單字字首(往上找)
            //大小寫的差別在標點符號(大寫以標點符號區隔,小寫用單字區隔)
y,Y //y = 複制 ; Y = 複制整行
p,P //p = 遊標的右邊貼上 ; P = 遊邊的左邊貼上
v,V //v 標記模式 ; V 標記整行
ggVG //全選
u,^y //u undo , ^y redo
/,n,N // / 搜尋 ; n 找下一個 ; N 找上一個
:%s/x/y/g //搜尋取代 x -> y %:指定全檔 g:指定每行有2個以上符合的全置換
:X //vim 加密
:sp //視窗分割 ^w+j,k 來切換下,上 or ^ww 切換視窗
:files //查詢已開啟的檔案
:e path //開啟 path
:e ++enc=big5 path //指定編碼開啟檔案(省略 path 時可以改變編輯中檔案的編碼)
^oo //開啟上次關閉時的檔案
:se ff=unix //換行格式 unix
:se ff=dos //換行格式 dos
:tabe path //在 tab 中 開啟 path
:tabc //關閉 現在的 tab
:tabo //關閉 其它的 tab
:tabn //切換到下一個 tab ; gt ; ^PAGEDOWN
:tabp //切換到上一個 tab ; gT ; ^PAGEUP
:tabs //顯示所有 tab
:tabm number //切換 tab 順序
:tabr //第一個 tab
:tabl //最後一個 tab

2011年2月16日水曜日

Debian 快速設定

[2011/06/22 Update]
//Setting:
dpkg-reconfigure locales
vim /etc/hostname
vim /etc/hosts
vim /etc/sudoers


//Install:
apt-cdrom add -m
apt-get dist-upgrade
apt-get update
apt-get upgrade
apt-get install ia32-libs //64bit Only
apt-get install ia32-libs-gtk //64bit Only
apt-get install ntfs-3g
apt-get install pppoeconf //pppoeconf , pon dsl-provider , poff
apt-get install ibus
apt-get install scim-modules-table
apt-get install vim
apt-get install vim-gnome
apt-get install wine //env LC_ALL=ja_JP.UTF-8 wine
apt-get install ttf-wqy-microhei
apt-get install ttf-wqy-zenhei


//Depends:
//Rainlendar
apt-get install libcurl3
apt-get install tofrodos

//TrueCrypt
apt-get install cryptsetup
apt-get install fuse-utils

//VirtualBox
apt-get install libqt4-opengl

//Wine
apt-get install lib32nss-mdns //64bit Only


//Others:
//Java
apt-get install equivs
apt-get install unixodbc
apt-get install ia32-libs //64bit Only
dpkg -i *.deb
/*
ia32-sun-java6-bin //64bit Only
java-common
sun-java6-bin
sun-java6-fonts
sun-java6-jdk
sun-java6-jre
sun-java6-plugin
*/


//Services:
//DHCP
apt-get install dhcp3-server
vim /etc/network/interfaces
/*
auto eth0
iface eth0 inet static
address 192.168.10.50
netmask 255.255.255.0

auto eth0:0
iface eth0:0 inet static
address 192.168.10.254
netmask 255.255.255.0
*/
/etc/init.d/networking restart
vim /etc/default/isc-dhcp-server //INTERFACES="eth0"
vim /etc/dhcp/dhcpd.conf
/*
# option definitions common to all supported networks...
# option domain-name "example.org";
# option domain-name-servers ns1.example.org, ns2.example.org;

# default-lease-time 600;
# max-lease-time 7200;

# A slightly different configuration for an internal subnet.
subnet 192.168.10.0 netmask 255.255.255.0 {
  range 192.168.10.100 192.168.10.200;
  option domain-name-servers 168.95.192.1, 168.95.1.1;
  option domain-name "belldandy.org";
  option routers 192.168.10.254;
  option broadcast-address 192.168.10.255;
  default-lease-time 60000;
  max-lease-time 720000;
  host vm-debiandt {
    hardware ethernet 00:0C:29:96:A1:6A;
    fixed-address 192.168.10.55;
  }
  host vm-win7dt {
    hardware ethernet 00:0c:29:3c:16:5a;
    fixed-address 192.168.10.57;
  }
  host vm-ws2008r2dev {
    hardware ethernet 00:0c:29:39:fb:40;
    fixed-address 192.168.10.58;
  }
  host vm-debiandev {
    hardware ethernet 00:0c:29:6b:90:d4;
    fixed-address 192.168.10.59;
  }
  host vm-debian64dev {
    hardware ethernet 00:0c:29:51:a2:25;
    fixed-address 192.168.10.60;
  }
  host vm-win7 {
    hardware ethernet 00:0c:29:20:0f:71;
    deny booting;
  }
  host vm-ws2008r2 {
    hardware ethernet 00:0c:29:38:3e:90;
    deny booting;
  }
}
*/
/etc/init.d/isc-dhcp-server restart //vim /var/lib/dhcp/dhcpd.leases

//SSH
apt-get install ssh
vim /etc/ssh/sshd_config
/*
Port 22
PermitRootLogin no
*/
vim /etc/hosts.allow //sshd:192.168.0.0
vim /etc/hosts.deny //sshd:all
/etc/init.d/ssh restart

//SAMBA
apt-get install samba
dpkg -i *.deb //gadmin-samba
/*
netbios name =
workgroup =
hosts allow = 127. 192.168.0.
interfaces = 127.0.0.1/8 192.168.0.0/24
remote announce =
remote browse sync =
*/

2011年2月13日日曜日

vimrc 設定

[2011/06/22 Update]
Windows 下是修改這個檔案
C:\Program Files (x86)\Vim\_vimrc
Linux 的話要看套件
Debian 是在 /etc/vim/vimrc(vim) /etc/vim/gvimrc(gvim)

另外就是修改設定時
有些副程式會更改設定值 要注意一下
C:\Program Files (x86)\Vim\_vimrc
/*
au GUIEnter * winpos 0 0
language english
se gfn=mingliu:h12
*/

/etc/vim/vimrc /etc/vim/gvimrc
/*
se gfn=WenQuanYi\ Zen\ Hei\ Mono\ 12
*/

Common:
/*
se clipboard=unnamed
se enc=utf-8
se fenc=utf-8
se fencs=ucs-bom,utf-8,big5
se ffs=dos,unix
se ic
se lines=32 columns=96
se list
se listchars=tab:>-,eol:<,trail:=
se nobackup
se nowritebackup
se noswapfile
se nu
se wrap
*/

2011年2月5日土曜日

Check & Setting Tool 0.4.1

[2011/02/11 Update]
Public Class Form1
    Dim regget(10) As String
    Dim regpath(5) As String
    Dim servicename(6) As String
    Dim strComputer = "."
    Dim objWMIService = GetObject("winmgmts:\\" & strComputer)
    Dim colSettings = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Text = "Check & Setting Tool 0.4.1(Need Administrator)"

        TabPage1.Text = "Check & Setting"
        TabPage2.Text = "ReadMe"

        TextBox1.Text = "ComputerName"
        TextBox2.Text = "ComputerWorkgroup"
        TextBox3.Text = "RegisteredOwner"
        TextBox4.Text = "RegisteredOrganization"
        TextBox5.Text = "AutoPlay"
        TextBox6.Text = "User Account Control"
        TextBox25.Text = "Folder Option"

        Button1.Text = "Refresh"
        Button2.Text = "Default All"
        Button3.Text = "Setting"
        Button4.Text = "Setting"
        Button13.Text = "Setting"

        regpath(0) = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
        regpath(1) = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
        regpath(2) = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers"
        regpath(3) = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
        regpath(4) = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services"

        Me.Button1.PerformClick()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        For Each objComputer In colSettings
            TextBox7.Text = objComputer.Name
            TextBox8.Text = objComputer.Workgroup
        Next

        regget(0) = My.Computer.Registry.GetValue _
                    (regpath(0), "RegisteredOwner", Nothing)
        regget(1) = My.Computer.Registry.GetValue _
                    (regpath(0), "RegisteredOrganization", Nothing)
        regget(2) = My.Computer.Registry.GetValue _
                    (regpath(1), "Hidden", Nothing)
        regget(3) = My.Computer.Registry.GetValue _
                    (regpath(1), "HideFileExt", Nothing)
        regget(4) = My.Computer.Registry.GetValue _
                    (regpath(1), "ShowSuperHidden", Nothing)
        regget(5) = My.Computer.Registry.GetValue _
                    (regpath(1), "SeparateProcess", Nothing)
        regget(6) = My.Computer.Registry.GetValue _
                    (regpath(1), "ShowCompColor", Nothing)
        regget(7) = My.Computer.Registry.GetValue _
                    (regpath(1), "SharingWizardOn", Nothing)
        regget(8) = My.Computer.Registry.GetValue _
                    (regpath(2), "DisableAutoplay", Nothing)
        regget(9) = My.Computer.Registry.GetValue _
                    (regpath(3), "EnableLUA", Nothing)

        TextBox9.Text = regget(0)
        TextBox10.Text = regget(1)

        If regget(2) = 1 And _
            regget(3) = 0 And _
            regget(4) = 1 And _
            regget(5) = 1 And _
            regget(6) = 0 And _
            regget(7) = 0 Then
            TextBox26.Text = "Default Setting"
        Else
            TextBox26.Text = "User Setting"
        End If

        If regget(8) = 1 Then
            TextBox11.Text = "Disabled"
            Button5.Text = "Enabled"
        ElseIf regget(8) = 0 Then
            TextBox11.Text = "Enabled"
            Button5.Text = "Disabled"
        End If

        If regget(9) = 0 Then
            TextBox12.Text = "Disabled"
            Button6.Text = "Enabled"
        ElseIf regget(9) = 1 Then
            TextBox12.Text = "Enabled"
            Button6.Text = "Disabled"
        End If

        servicename(0) = "WinDefend"
        servicename(1) = "MpsSvc"
        servicename(2) = "Themes"
        servicename(3) = "AudioSrv"
        servicename(4) = "wscsvc"
        servicename(5) = "WSearch"
        For i = 0 To 5 Step 1
            If My.Computer.Registry.GetValue _
               (regpath(4) & "\" & servicename(i), _
               "DisplayName", Nothing) Is Nothing Then
                Select Case servicename(i)
                    Case servicename(0)
                        TextBox13.Text = "No Service"
                        TextBox19.Text = "No Service"
                        Button7.Text = "No Service"
                        Button7.Enabled = False
                    Case servicename(1)
                        TextBox14.Text = "No Service"
                        TextBox20.Text = "No Service"
                        Button8.Text = "No Service"
                        Button8.Enabled = False
                    Case servicename(2)
                        TextBox15.Text = "No Service"
                        TextBox21.Text = "No Service"
                        Button9.Text = "No Service"
                        Button9.Enabled = False
                    Case servicename(3)
                        TextBox16.Text = "No Service"
                        TextBox22.Text = "No Service"
                        Button10.Text = "No Service"
                        Button10.Enabled = False
                    Case servicename(4)
                        TextBox17.Text = "No Service"
                        TextBox23.Text = "No Service"
                        Button11.Text = "No Service"
                        Button11.Enabled = False
                    Case servicename(5)
                        TextBox18.Text = "No Service"
                        TextBox24.Text = "No Service"
                        Button12.Text = "No Service"
                        Button12.Enabled = False
                End Select
            Else
                Select Case servicename(i)
                    Case servicename(0)
                        Dim WinDefend = objWMIService.Get _
                        ("Win32_Service.Name='WinDefend'")
                        TextBox13.Text = WinDefend.DisplayName
                        TextBox19.Text = WinDefend.StartMode & "," & WinDefend.State()
                        If WinDefend.StartMode = "Disabled" Then
                            Button7.Text = "Auto"
                        ElseIf WinDefend.StartMode = "Auto" Then
                            Button7.Text = "Disabled"
                        End If
                    Case servicename(1)
                        Dim MpsSvc = objWMIService.Get _
                        ("Win32_Service.Name='MpsSvc'")
                        TextBox14.Text = MpsSvc.DisplayName
                        TextBox20.Text = MpsSvc.StartMode & "," & MpsSvc.State()
                        If MpsSvc.StartMode = "Disabled" Then
                            Button8.Text = "Auto"
                        ElseIf MpsSvc.StartMode = "Auto" Then
                            Button8.Text = "Disabled"
                        End If
                    Case servicename(2)
                        Dim Themes = objWMIService.Get _
                        ("Win32_Service.Name='Themes'")
                        TextBox15.Text = Themes.DisplayName
                        TextBox21.Text = Themes.StartMode & "," & Themes.State()
                        If Themes.StartMode = "Disabled" Then
                            Button9.Text = "Auto"
                        ElseIf Themes.StartMode = "Auto" Then
                            Button9.Text = "Disabled"
                        End If
                    Case servicename(3)
                        Dim AudioSrv = objWMIService.Get _
                        ("Win32_Service.Name='AudioSrv'")
                        TextBox16.Text = AudioSrv.DisplayName
                        TextBox22.Text = AudioSrv.StartMode & "," & AudioSrv.State()
                        If AudioSrv.StartMode = "Disabled" Then
                            Button10.Text = "Auto"
                        ElseIf AudioSrv.StartMode = "Auto" Then
                            Button10.Text = "Disabled"
                        End If
                    Case servicename(4)
                        Dim wscsvc = objWMIService.Get _
                        ("Win32_Service.Name='wscsvc'")
                        TextBox17.Text = wscsvc.DisplayName
                        TextBox23.Text = wscsvc.StartMode & "," & wscsvc.State
                        If wscsvc.StartMode = "Disabled" Then
                            Button11.Text = "Auto"
                        ElseIf wscsvc.StartMode = "Auto" Then
                            Button11.Text = "Disabled"
                        End If
                    Case servicename(5)
                        Dim WSearch = objWMIService.Get _
                        ("Win32_Service.Name='WSearch'")
                        TextBox18.Text = WSearch.DisplayName
                        TextBox24.Text = WSearch.StartMode & "," & WSearch.State
                        If WSearch.StartMode = "Disabled" Then
                            Button12.Text = "Auto"
                        ElseIf WSearch.StartMode = "Auto" Then
                            Button12.Text = "Disabled"
                        End If
                End Select
            End If
        Next
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim RegisteredOwner As String
        RegisteredOwner = TextBox9.Text
        My.Computer.Registry.SetValue _
        (regpath(0), "RegisteredOwner", RegisteredOwner, Microsoft.Win32.RegistryValueKind.String)
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim RegisteredOrganization As String
        RegisteredOrganization = TextBox10.Text
        My.Computer.Registry.SetValue _
        (regpath(0), "RegisteredOrganization", RegisteredOrganization, Microsoft.Win32.RegistryValueKind.String)
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        If regget(8) = 0 Then
            My.Computer.Registry.SetValue _
            (regpath(2), "DisableAutoplay", "1", Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf regget(8) = 1 Then
            My.Computer.Registry.SetValue _
            (regpath(2), "DisableAutoplay", "0", Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        If regget(9) = 1 Then
            My.Computer.Registry.SetValue _
            (regpath(3), "EnableLUA", "0", Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf regget(9) = 0 Then
            My.Computer.Registry.SetValue _
            (regpath(3), "EnableLUA", "1", Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        If Button7.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\WinDefend", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button7.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\WinDefend", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        If Button8.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\MpsSvc", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button8.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\MpsSvc", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        If Button9.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\Themes", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button9.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\Themes", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        If Button10.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\AudioSrv", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button10.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\AudioSrv", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        If Button11.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\wscsvc", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button11.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\wscsvc", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        If Button12.Text = "Auto" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\WSearch", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        ElseIf Button12.Text = "Disabled" Then
            My.Computer.Registry.SetValue _
            (regpath(4) & "\WSearch", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        End If
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        My.Computer.Registry.SetValue _
        (regpath(1), "Hidden", "1", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "HideFileExt", "0", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "ShowSuperHidden", "1", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "SeparateProcess", "1", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "ShowCompColor", "0", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(1), "SharingWizardOn", "0", Microsoft.Win32.RegistryValueKind.DWord)
        Me.Button1.PerformClick()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        My.Computer.Registry.SetValue _
        (regpath(0), "RegisteredOwner", "Belldandy", Microsoft.Win32.RegistryValueKind.String)
        My.Computer.Registry.SetValue _
        (regpath(0), "RegisteredOrganization", "Syaorin", Microsoft.Win32.RegistryValueKind.String)
        My.Computer.Registry.SetValue _
        (regpath(2), "DisableAutoplay", "1", Microsoft.Win32.RegistryValueKind.DWord)
        My.Computer.Registry.SetValue _
        (regpath(3), "EnableLUA", "0", Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox13.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\WinDefend", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox14.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\MpsSvc", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox15.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\Themes", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox16.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\AudioSrv", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox17.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\wscsvc", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord)
        If Not TextBox18.Text = "No Service" Then My.Computer.Registry.SetValue _
        (regpath(4) & "\WSearch", "Start", 2, Microsoft.Win32.RegistryValueKind.DWord)
        Me.Button13.PerformClick()
    End Sub
End Class

2011年1月28日金曜日

Physics

time = articles * gravity

時間 = 物體 * 衰變 or 衰變 = 物體 * 時間 ?

2011年1月27日木曜日

Sleipnir 網頁自動重新整理 設定位置

CCC2 Scaling Options 設定位置

新版的 Catalyst 11.1 可以下載了
裝好後 設定的介面也改成 CCC2 了
不過老樣子
裝好後 畫面預設值會有黑邊問題
要從這邊手動調整 My Digital Flat-Panels -> Scaling Options(Digital Flat-Panels)

2011年1月25日火曜日

Debian 使用升級光碟升級系統

今天看到 5.0.8 出了 就升級一下
記得用 root 裝 ; 用 sudo 好像不給裝
apt-cdrom add -m //將光碟加入來源(/etc/apt/sources.list)
apt-get dist-upgrade //升級到新版本
參考資料:
http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.zh-tw.html
http://www.debian.org/doc/manuals/apt-howto/ch-basico.zh-tw.html#s-cdrom

2011年1月24日月曜日

Debian 安裝 Java(JRE)

//先取得下面 5 個檔案
ia32-sun-java6-bin_6-22-0lenny1_amd64.deb // http://packages.debian.org/lenny/ia32-sun-java6-bin
java-common_0.30_all.deb // http://packages.debian.org/lenny/java-common
sun-java6-bin_6-22-0lenny1_amd64.deb // http://packages.debian.org/lenny/sun-java6-bin
sun-java6-jre_6-22-0lenny1_all.deb // http://packages.debian.org/lenny/sun-java6-jre
sun-java6-plugin_6-22-0lenny1_amd64.deb // http://packages.debian.org/lenny/sun-java6-plugin

//檔案準備好後 先把依存性相關的安裝好(下面3個)

System -> Administration -> Syanaptic Package Manager
Search "equivs" //java-common
Mark for Installation "equivs"

Search "unixodbc" //sun-java6-bin
Mark for Installation "unixodbc"

Search "ia32-libs" //ia32-sun-java6-bin
Mark for Installation "ia32-libs"

dpkg -i *.deb //檔案準備好 放一起後 執行就能安裝了
32 位元的要抓 i386 版 ; ia32-sun-java6-bin_6-22-0lenny1_amd64.deb & ia32-libs 的部份不用裝
裝完後可以到這測試 : http://java.com/en/download/testjava.jsp

2011年1月23日日曜日

Linux 常用指令筆記

[2011/02/20 Update]
chmod //變更權限
history //顯示使用過的指令
!(number) //執行使用過的指令編號
history -c //清除使用過的指令(暫時)
rm /home/username/.bash_history //清除使用過的指令(永久)
iconv -f big5 -t utf-8 filename -o outfilename //轉碼 -f(原始編碼) -t(輸出編碼)
uname //顯示系統資訊
tar -C 目錄 -xjvf 檔名.bz2 //解壓縮(x)檔案.bz2(z)
tar -C 目錄 -xzvf 檔名.gz //解壓縮(x)檔案.gz(z)
tar -tvf 檔名 //查看壓縮檔(t) 壓(解)縮處理中檔名(v) 處理的檔案(f) 視壓縮檔檔名加入 j,z
tar -cvf 壓縮檔名 目標 //壓縮(c)檔案 視壓縮類型加入 j,z
locale //環境變數
LANG=en_US.UTF-8 //設定環境
LANG=zh_TW.BIG5 //設定環境

2011年1月14日金曜日

Debian 變更 hostname 後 程式和服務執行緩慢的解決方法

[2011/01/17 Update]
使用 hostname 指令變更主機名稱時
有時候(使用 DHCP 或其它原因不明) 主機名稱會加上 domain name
這時就會造成有些程式或服務異常的緩慢 因為要去查 DNS (查到的資料這樣寫)

這時候 直接從這邊改回想要的主機名稱(記得拿掉 domain name)
vim /etc/hosts
就可以解決緩慢的問題
vim /etc/hostname
vim /etc/hosts
建議是直接改這 2 個檔案來更改主機名稱比較沒有問題
/etc/init.d/hostname.sh
不想重新開機可以這樣直接使用主機名稱
只是我試的結果 會靠成程式和服務異常緩慢(不確定是不是用了 DHCP 的關係)
改好還是重開會好點

ps:還不太確定這樣解釋對不對 不過解決的方法沒有錯

2011年1月7日金曜日

Windows 7 開機程式的安裝與移除

前天重灌了 Windows 7
然後 那天忽然忘了 Windows 7 安裝時
會把開機程式裝在 IDE 硬碟上(優先順序是 IDE>SATA)
可能是 BIOS 先抓到 IDE 後 開完機
才呼叫 SATA 的硬碟偵測程式(SATA 跑 AHCI)
害我想說 怎麼裝完 C 碟沒有開機程式(怕哪天拔了 IDE 硬碟 SATA就開不了機)
下面是把開機程式裝到 SATA 硬碟的方法
在 Windows 裡 用命令列提示字元就可以
BOOTSECT.EXE /NT60 C: //這行不一定要執行 看你的 OS (VISTA 前的才需要)
BCDBOOT C:\WINDOWS /L JA-JP /S C: //把開機程式安裝到 C 碟 (JA-JP 是語系 請參考 Boot 目錄自行設定)

裝完沒問題後 就換移除 IDE 碟上的開機程式(這邊我的 IDE 硬碟磁碟代號是 I)
TAKEOWN /F I:\boot\*.* /A
CACLS I:\boot\*.* /E /G Administrators:F
TAKEOWN /F I:\bootmgr /A
CACLS I:\bootmgr /E /G Administrators:F
執行完後 Boot 目錄和 bootmgr 就可以移除了

其實也可以用視窗選檔案然後右鍵點內容設定
只是打指令比較快

2011年1月2日日曜日

Debian 5.0.7 AMD64 Firefox 3.6.13 安裝使用方法

[2011/03/03 Update]
本來已經放棄在 Debian 上使用 Firefox 了(Firefox 官網沒有 64-bit 的版本 ; 32 的又不能跑)

後來翻到這篇 http://wiki.ubuntu-tw.org/index.php?title=Ubuntu-AMD64-Howto
然後測試了 ia32-libs 但是還是不行(Firefox 能跑了 但是不能連線 還一堆 Error)

所以我又用了 iceweasel 然後改相容性檢查
參考這篇:http://kb.mozillazine.org/Extensions.checkCompatibility
然後 pcman 是能裝了 但是不能跑
之前也測過升級 iceweasel 到 3.6.13 它還是不能用 pcman (不過那時候似乎沒測過改相容性)

最後 我找到這個 http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/
裡面有 64-bit 的 Firefox(這個檔案 : firefox-3.6.13.en-US.linux-x86_64.tar.bz2)
解開來執行 firefox 就可以了(建議解壓縮後放到 /opt)
這邊的下載點有變動了 請改用這個 http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2010/12/2010-12-01-03-mozilla-1.9.2/firefox-3.6.13.en-US.linux-x86_64.tar.bz2

Flash Player 也是照上一篇的方法 把檔案放進 plugins 裡就能使用了
另外要注意的是 這版本會一直升級測試版(?
要把 app.update.enabled (about:config) 改成 false (直接關閉自動升級)

結論 64-bit 的 OS 轉換時比較麻煩一點(?
(其實我裝 Firefox 只是想用 pcman 的 extensions 上 bbs)

2011年1月1日土曜日

Debian 5.0.7 AMD64 FlashPlayer 安裝方法

首先 到這下載 64-bit 的 FlashPlayer
http://labs.adobe.com/
http://labs.adobe.com/downloads/flashplayer10_square.html

記得抓 Linux 版的(?
flashplayer10_2_p3_64bit_linux_111710.tar.gz (使用此版測試沒問題)

然後解壓縮出 libflashplayer.so 這個檔案
然後 cp libflashplayer.so /usr/lib/iceweasel/plugins (權限不足記得 sudo)
接著重開 iceweasel 就可以了(這邊是示範裝在 iceweasel 其它的應該差不多)

基本上是很少用 Linux 看 Flash
結果臨時要用就找了一下方法
感覺上 Linux 64
對 32 位元的程式相容性沒有 Windows 64 來的好
不過也可能是設定問題XD