2009年8月30日

nokia 手機 忘記保密碼時怎辦?

http://nfader.z-host.ru/


請上這個網站,看看自己手機的IMEI碼,
1.輸入到Enter IMEI:

2.勾選I'm legal owner of the phone with that IMEI我是合法使用者

3.點選"generate"按鈕

就會出現手機原廠的保密碼啦~

2009年8月29日

2009年8月25日

初學! ubuntu網路設定(DNS, /etc/network/interfaces)

姑且不說如何設定,就結論來說,
網路的基本知識一定要有,才能快速的學到想學的東西
例如:ip,gateway,dns等等


在ubuntu9.04下,雖然可以用圖形介面設定有線網路和無線網路,但Linux的精隨是指令啊!
(打指令才能耍帥)

視窗介面是啥?滾到一邊去吧哼哼~~~

/etc/network/interfaces的內容如下

auto lo #自動啟動lo虛擬網卡 (linux內鍵loopback設定,還不知道是啥目的)
iface lo inet loopback #lo網卡的設定

auto eth0 #自動啟動eth0虛擬網卡

iface eth0 inet static #設定eth0為固定ip(router底下的固定)
address 192.168.0.5 #設定ip
netmask 255.255.255.0 #子遮罩,很簡單
gateway 192.168.0.1 #這裡的gateway是我新買的無線AP的ip(有router功能),前面還有一台hinet的小烏龜


sudo ifdown eth0 # 關閉 eth0 這個裝置
sudo ifup eth0 # 啟用 eth0
並從 interfaces 讀取設定檔!!!!!!
-----------------------------------------------------------


解決ping不到www.google.com.tw的方法(DNS失效)

/etc/resolv.conf
加入以下內容

nameserver 168.95.1.1 #hinet的主機名稱





ubuntu尋找安裝套件指令apt-cache

終端機下apt-cache指令可尋找安裝檔


apt-cache search rar > ~/xxx.txt


exp:
可找到
p7zip-rar - non-free rar module for p7zip

apt-get install p7xip-rar

等待安裝後,即可解壓縮rar檔

2009年8月24日

修復ubuntu9.04開機時會在starting nfs common utilities fail卡很久

轉自作者:dimis2410

I had the same problem when i tried to set up a static IP... and this worked for me :



sudo gedit /etc/network/interfaces


and make the file look like this:

修改即可
auto lo
iface lo inet loopback

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

auto eth0



"192.168.1.100 " my static ip
"255.255.255.0" my subnet mask
"192.168.1.1" my routers/gateway ip
"eth0" my current ethernet interface

Change the addresses to yours...
and then restart networking...

sudo /etc/init.d/networking restart


Now i'm sure that it will not hang on "Starting NFS common utils..."

:)

2009年8月23日

What's "buildroot"??

http://opencsl.openfoundry.org/
實驗三 製作root filesystem


  • 1:Buildroot 是一組 Makefile 可以用來輕鬆產生 Toolchain 與 Root Filesystem 並且使用 uclibc 函式庫。安裝可以透過匿名方式存取 svn
    svn co svn://uclibc.org/trunk/buildroot
  • 其他資訊參考:http://buildroot.uclibc.org/


第一次接觸u-boot bootloader for pxa270 找到的文章



本文
http://blog.csdn.net/chongchongliu/archive/2008/11/02/3207340.aspx

繁體中文翻譯:

2009年8月22日

2009年8月19日

ubuntu 9.04 samba & Windows XP分享資料夾設定

1.首先在ubuntu安裝samba

應用程式-->添加/移除-->搜尋samba 安裝


2.終端機下指令
sudo /etc/init.d/samba stop




3.在/etc/samba/smb.conf最後加上分享資料夾設定(改權限sudo chmod 755 smb.conf)

[SHARE]
path = /home/你自己名稱/shared ;分享路徑
browseable = yes ;是否可瀏覽
read only = no ;唯讀
create mask = 0644 ;檔案遮罩
directory mask = 0755 ;資料夾遮罩


4.終端機指令

重起samba網路
sudo /etc/init.d/samba restart



設定帳號密碼
sudo smbpasswd -a <帳號>
會要求輸入密碼

5.在XP中開始-->執行-->\\192.168.0.7(ubuntu的網路位置)/home/你自己名稱/shared

輸入密碼帳號後即可進入共享資料夾


如果將來想要使用samba時
終端機下指令
sudo /etc/init.d/samba restart

參考網站
http://blog.xuite.net/johnlin1958/ubuntu/20184242

2009年8月17日

ubuntu 8.04 xconfig 必須安裝檔

sudo aptitude install libqt3-headers libqt3-mt-dev libqt3-compat-headers libqt3-mt

#安装xconfig依赖包,


make xconfig



資料來源:
http://forum.ubuntu.org.cn/viewtopic.php?t=110461&highlight=

[電腦]新學到ctags秘技及vi新招數 轉自Simon's misc. notes

轉自Simon's misc. notes的文章

http://zylix666.blogspot.com/2005/05/ctagsvi.html



1, ctags
- generate tag files for source code

以kernel source code 為例
我們到source tree的最上層, 使用以下命令

[zylix@zylix linux]ctags -R

經過一段時間後, 會看到新產生一個名為tags的檔案.
這就是tag file, 裡面會記錄整個kernel source code的tag.可以把這個檔cat 出來看就知道裡面的記錄.

2, 在vim裡面使用tag
用vim打開kernel裡的任一檔案. 舉例來說
vim arch/arm/mach-pxa/mainstone.c

開始使用剛才我們產生的tag 檔.
:set tags=tags

(1), 找一個function的實作
ctrl+]
(2), 找一個變數的宣告
ctrl+]
(3), 當我們想要跳回原來的地方
ctrl+t
(4), 想要show出變數的型別
ctrl+]+i

3, 新學到的vi招數之1 -- 同一個vi consol下編輯多個檔案
(1)在命令列中, 想要多重編輯, 也就是用同一個console編輯多個檔案
:e ctrl+D
可以列出所在位置的所有檔案列表.
找到想要開啟的檔案檔案
:e [路徑+檔名]
(2), 多重編輯檔案的切換
:b <要切換的檔案編號>
(3),當我們開了很多個檔案, 無法記住哪一個檔案是哪一個編號時,可以用ls列出所有開啟的檔案及其編號, 再用b <編號>加以開啟.

舉例來說
我現在開啟一個檔案arch/arm/mach-pxa/mainstone.c
vim arch/arm/mach-pxa/mainstone.c
我想要在同一個vi console下再開arch/arm/mach-pxa/generic.c
:e arch/arm/mach-pxa/generic.c
後來又開了drivers/net/smc91x.c
:e drivers/net/smc91x.c
後來我又想要用arch/arm/mach-pxa/mainstone.c這個檔案了, 就用
:b 1
就可以把這個檔案拉回來編輯.
當我們巳經開了好多個檔案了. 巳經不記得哪一個是哪一個了. 就用
:ls
這時vi 會列出
1 "arch/arm/mach-pxa/mainstone.c" 行 20
2 %a "arch/arm/mach-pxa/generic.c" 行 50
3 # "drivers/net/smc91x.c" 行 1

我們再用
: b 1
就可以編輯第一號的檔案, 也就是arch/arm/mach-pxa/mainstone.c了

4,新學到的vi招數之2--找出code裡面的對應
我們在寫code時常常會需要找括號對應, 雖然我們巳經養成好習慣在寫code時先把括號對應做好,
但很難保證我們一定不會需要去trace對應.
我們只要到括號上按下,shift+%, 就可以跳至對應的括號.
這個功能不只可以trace括號,連條件式編譯的#ifdef/#else/#endif都可以trace. 非常好用.

2009年8月12日

2009年8月11日

解決ubuntu 9.04 facebook開心農場亂碼

終端機下輸入

sudo gedit /etc/fonts/conf.avail/49-sansserif.conf

修改第18行成為
sans

重新開啟ubuntu的firefox facebook開心農場即可(flash player版本:10)


ps.也可以套用opera在神來也麻將亂碼的問題

NO-CARRIER 網卡無法啟動

 工作時,由於想要啟動linux OS的網卡, 發現某張新設定的網卡一直無法啟動,就算下指令UP了,但是也沒有順利啟動 所以爬文後,想要確認該網卡的status, 發現某行為: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu...