星期六, 3月 17, 2012

firefox同步

這實在太強大了...
之前有擴充套件(add-on)可以同步記錄書籤
但現在firefox自己出了"選項/同步",只能記錄書籤已經不夠看了

試用了一下,真的是太棒了
除了書籤外,最重要的是每次換台新電腦就得要重安裝套件
居然連這也能同步,太強了... 我要按個讚

後記...
firefox不知為何在2012.7常當掉
發現是在輸入項(input)時,很容易掛
因為太頻繁了,所以只好先改用chrome

用完Chrome後...
好吧... 我改用Chrome了
因為browser是綁gmail帳號
chrome就自動把書籤、autocompleted都同步了...
firefox強項剩firebug...

星期五, 3月 09, 2012

linux prompt

  1. 設置檔
    • 全users
      /etc/profile or /etc/bashrc
    • 個別user
      ~/.bash_profile , ~/.bash_login , ~/.profile , ~/.bashrc or ~/.bash_logout
  2. 客製化prompt
    PS1='[\u@\h \w] \$ # ' #即為user@host ~

    PS1="\e[\u@\h \w]$ \e]" #即為[user@host ~]
    加框'[', ']',由於是key words所以要加\e
    而0;32m 是指顏色,其他以此類推應該就看的出來了
  3. 加上顏色
    PS1="\e[0;32m[\u@\h \w]\e]$ \e[m]" #即為[user@host ~]
  4. 啟使
    source .bashrc
    or
    . .bashrc
  5. Changing foreground and background bash prompt colors

    Syntax for changing colors in the bash is as follows:
    \033[ -> Indicates the beginning of color in the text
     x;yzm - Indicates color code
     \033[00m - Indicates the end of color in the text  

截錄常用的字元代表意思
Bash special characterBash special character explanationBash special characterBash special character explanation
\] end a sequence of non-printing characters \[ begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
\h the hostname up to the first `.' \H the hostname
\s the name of the shell, the basename of $0 (the portion following the final slash) \l the basename of the shell's terminal device name
\$ if the effective UID is 0, a #, otherwise a $ \u the username of the current user
\w the current working directory \W the basename of the current working directory
\D{format} the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required

個人配置檔
#prompt
if [ $TERM = 'xterm' ]
then
        PS1='\e[0;32m[\[\033[02;32m\]\u@\h\[\033[01;34m\] \w\e[0;32m]\$\e[m '
else
        PS1='[\u@\h \w] \$ # '
fi

# colorful man page 
export PAGER="`which less` -s"
export BROWSER="$PAGER"
export LESS_TERMCAP_mb=$'\E[01;36m'
export LESS_TERMCAP_md=$'\E[01;36m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;33m'

References

Bash prompt basics

星期二, 3月 06, 2012

FirePHP no message in FireBug console

忘記更新了什麼東西,結果FirePHP居然沒反應了
goolge了一下,也有人遇到,印象中是更新了FirePHP的套件就解決了

而最近公司更換網域,環境也跟著改變
重新安裝FireBug及FirePHP後,居然又沒反應了
又找不到原本解決的網頁,真是快瘋了

後來注意到firefox有個提醒列
提到要"enable Net Panel ..."
才去開放script及net panel,如下圖

才知道FirePHP需要開啟net panel才能動....