2020年1月2日 星期四

Bluehost / Hostmonster DNS

ns1.bluehost.com
ns2.bluehost.com

162.159.24.80
162.159.25.175

--

ns1.hostmonster.com
ns2.hostmonster.com

162.159.24.157
162.88.61.31

2014年11月18日 星期二

memcache-top 安裝使用

安裝方式
  1. mkdir ~/srv/;cd ~/srv/
  2. svn checkout http://memcache-top.googlecode.com/svn/trunk/ memcache-top
  3. cd memcache-top
  4. ln -s ~/srv/memcache-top/memcache-top ~/bin/memcache-top
使用方法
memcache-top --instances 192.168.1.1:11211

2014年3月10日 星期一

Content-Language 網頁語言編碼對照表

網頁語言編碼對照表 2013.02.25
<meta http-equiv="Content-Language" content="代碼" />



代碼 語言名稱 正式語言名稱
de 德語 Deutsch
en 英語 English
es 西班牙語 español
fr 法語 Français
ru 俄語 Русский
zh-TW 中文(台灣) 中文
ja 日語 日本語
ko 朝鮮語(韓國) 한국어
af 南非荷蘭語  
ar-ae 阿拉伯語(阿拉伯聯合酋長國)  
ar-bh 阿拉伯語(巴林)  
ar-dz 阿拉伯語(阿爾及利亞)  
ar-eg 阿拉伯語(埃及)  
ar-ip 阿拉伯語(伊拉克)  
ar-jo 阿拉伯語(約旦)  
ar-kw 阿拉伯語(科威特)  
ar-lb 阿拉伯語(黎巴嫩)  
ar-ly 阿拉伯語(利比亞)  
ar-ma 阿拉伯語(摩洛哥)  
ar-om 阿拉伯語(阿曼)  
ar-qa 阿拉伯語(卡塔爾)  
ar-sa 阿拉伯語(沙特阿拉伯)  
ar-sy 阿拉伯語(敘利亞)  
ar-tn 阿拉伯語(突尼斯)  
ar-ye 阿拉伯語(也門)  
be 貝勞語  
bg 保加利亞語  
ca 加泰羅尼亞語  
cs 捷克語  
da 丹麥語  
de-at 德語(奧地利)  
de-ch 德語(瑞士)  
de-li 德語(列支敦士登)  
de-lu 德語(盧森堡)  
el 希臘語  
en-au 英語(澳大利亞)  
en-bz 英語(伯利茲)  
en-ca 英語(加拿大)  
en-gb 英語(英國)  
en-ie 英語(愛爾蘭)  
en-jm 英語(牙買加)  
en-nz 英語(新西蘭)  
en-tt 英語(特立尼達)  
en-us 英語(美國)  
en-za 英語(南非)  
es-ar 西班牙語(阿根廷)  
es-bo 西班牙語(玻利維亞)  
es-ce 西班牙語(厄瓜多爾)  
es-cl 西班牙語(智利)  
es-co 西班牙語(哥倫比亞)  
es-cr 西班牙語(哥斯達黎加)  
es-do 西班牙語(多米尼加共和國)  
es-gt 西班牙語(危地馬拉)  
es-hn 西班牙語(洪都拉斯)  
es-mx 西班牙語(墨西哥)  
es-ni 西班牙語(尼加拉瓜)  
es-pa 西班牙語(巴拿馬)  
es-pe 西班牙語(秘魯)  
es-pr 西班牙語(波多黎各)  
es-py 西班牙語(巴拉圭)  
es-sv 西班牙語(薩爾瓦多)  
es-uy 西班牙語(烏拉圭)  
es-ve 西班牙語(委內瑞拉)  
eu 巴斯克語  
fa 波斯語  
fi 芬蘭語  
fo 法羅語  
fr-be 法語(比利時)  
fr-ca 法語(加拿大)  
fr-ch 法語(瑞士)  
fr-lu 法語(盧森堡)  
gd 蓋爾語(蘇格蘭)  
gd-ie 蓋爾語(愛爾蘭)  
he 希伯來語  
hi 北印度語  
hr 克羅地亞語  
hu 匈牙利語  
in 印度尼西亞語  
is 冰島語  
it 意大利語(標准)  
it-ch 意大利語(瑞士)  
ji 依地語  
lt 立陶宛語  
lv 拉脫維亞語  
mk 馬其頓語  
ms 馬來西亞語  
mt 馬耳他語  
nl 荷蘭語  
nl-be 荷蘭語(比利時)  
no 挪威語(尼諾斯克)  
pl 波蘭語  
pt 葡萄牙語(葡萄牙)  
pt-br 葡萄牙語(巴西)  
rm 拉丁語  
ro 羅馬尼亞語  
ro-mo 羅馬尼亞語(摩爾達維亞)  
ru-mo 俄語(摩爾達維亞)  
sb 索布語  
sk 斯洛伐克語  
sl 斯洛文尼亞語  
sq 阿爾巴尼亞語  
sr 塞爾維亞語(西裏爾)  
sr 塞爾維亞語(拉丁)  
sv 瑞典語  
sv-fi 瑞典語(芬蘭)  
sx 蘇圖語  
sz 薩摩斯語(拉普蘭)  
th 泰語  
tn 瓦納語  
tr 土耳其語  
ts 湯加語  
uk 烏克蘭語  
ur 烏爾都語  
ve 文達語  
vi 越南語  
xh 科薩語  
zh-cn 中文(中國)  
zh-hk 中文(香港)  
zh-sg 中文(新加坡)  
zu 祖魯語  

2014年3月2日 星期日

EXCEL 檔案格式與副檔名所指定的格式不同


  1. 結束 Excel 2007。
  2. 啟動登錄編輯程式。
    • 在 Windows Vista 中,按一下 [開始
      [開始] 按鈕
      在 [開始搜尋] 方塊中鍵入regedit ,然後按 ENTER 鍵。

      使用者帳戶控制] 權限
      如果您接到提示輸入系統管理員密碼或確認的提示,請輸入密碼,或按一下 [繼續]。
    • 在 Windows XP 中,按一下 [開始],按一下 [執行]、 輸入regedit,然後按一下[確定]。
  3. 找出並按一下下列登錄子機碼:
    HKEY_CURRENT_USER\Software\Microsoft\Office\ < 版本號碼 > \Excel\Security
  4. 在 [編輯] 功能表上指向 [新增],然後按一下 [DWORD 值]。
  5. 輸入ExtensionHardening,然後再按 ENTER 鍵。
  6. ExtensionHardening,以滑鼠右鍵按一下,然後按一下 [修改]。
  7. 在 [數值資料] 方塊中,輸入數值資料],然後按一下[確定]。

    下列清單會包含適用於 [ExtensionHardening] 設定的數值資料設定:
    • 0: 不檢查檔案的副檔名與檔案類型,並略過警告訊息的函式。
    • 1: 檢查檔案的副檔名與檔案類型。
    • 2: 檢查檔案的副檔名與檔案類型。
    注意預設值的資料為 1。當在數值資料設定為 1 時,行為會變成相同時沒有設定登錄值。當在數值資料設定為 0 時,檔案的副檔名及檔案內容不會檢查所有情況下。我們不建議您略過這個函式。

資料來源:http://support.microsoft.com/kb/948615/zh-tw

2014年2月2日 星期日

Windows下的軟連結

mklink /j 捷徑放置路徑 目標路徑
ex:
mklink /j "C:\Users\XXX\AppData\Roaming\Apple Computer\MobileSync" "D:\Backup\MobileSync"

會將C:\Users\XXX\AppData\Roaming\Apple Computer\MobileSync 連結 到 D:\Backup\MobileSync


Linux
ln -fs 來源 目標

2014年1月3日 星期五

Git 指令速查

● git clone
● git push
● git pull
● git add
○ git add -i ,互動模式
○ git add 檔名 -p    互動式詢問, 切 commit 專用
○ git add 檔名  把指定的檔案放進 staging area
○ git add . 有異動的檔案全部放入 staging area. 偷懶作法 慎用
● git commit
○ git commit -v 寫摘要時 VIM 底下會有 diff
○ git commit -a 包含自動git add有異動的檔案
○ git commit -m “MESSAGE HERE”   不進 VIM 直接寫摘要
● git branch
○ git branch -d 分支名稱 刪除指定的分支
○ git branch -a # 看遠端 repo 所有分支
● git checkout
○ git checkout -f  清除全部未 commit 的異動, 慎用(不能復原)
● git revert
● git diff
○ git diff --cached 跟 staging area 比對差異 (commit 後使用)
● git merge 合併分支
○ git merge –no-ff ,commit log 會紀錄您是開分支出去的,清楚紀錄您的分支操作步驟
● git stash
○ git stash 把未 commit 的異動”暫存”, 讓 repo 變回乾淨狀態
○ git statsh -u 包含未新增的異動”暫存”, 讓 repo 變回乾淨狀態
○ git stash pop 把上述的異動從”暫存區” 抓回來
● git blame
○ git blame -w  忽略空白的 commit
● git log
○ git log -p 也顯示程式碼異動細節
● tig

Composer 筆記

1.安裝
http://getcomposer.org/doc/00-intro.md
$ curl -sS https://getcomposer.org/installer | php
2.使用
http://getcomposer.org/doc/03-cli.md

Command-line interface


init

In the Libraries chapter we looked at how to create a composer.json by hand. There is also an initcommand available that makes it a bit easier to do this.
When you run the command it will interactively ask you to fill in the fields, while using some smart defaults.
$ php composer.phar init

install

The install command reads the composer.json file from the current directory, resolves the dependencies, and installs them into vendor.
$ php composer.phar install
If there is a composer.lock file in the current directory, it will use the exact versions from there instead of resolving them. This ensures that everyone using the library will get the same versions of the dependencies.
If there is no composer.lock file, composer will create one after dependency resolution.

update

In order to get the latest versions of the dependencies and to update the composer.lock file, you should use theupdate command.
$ php composer.phar update
This will resolve all dependencies of the project and write the exact versions into composer.lock.
If you just want to update a few packages and not all, you can list them as such:
$ php composer.phar update vendor/package vendor/package2
You can also use wildcards to update a bunch of packages at once:
$ php composer.phar update vendor/*

require

The require command adds new packages to the composer.json file from the current directory.
$ php composer.phar require
After adding/changing the requirements, the modified requirements will be installed or updated.
If you do not want to choose requirements interactively, you can just pass them to the command.
$ php composer.phar require vendor/package:2.* vendor/package2:dev-master

global

The global command allows you to run other commands like install, require or update as if you were running them from the COMPOSER_HOME directory.
This can be used to install CLI utilities globally and if you add $COMPOSER_HOME/vendor/bin to your $PATH environment variable. Here is an example:
$ php composer.phar global require fabpot/php-cs-fixer:dev-master
Now the php-cs-fixer binary is available globally (assuming you adjusted your PATH). If you wish to update the binary later on you can just run a global update:
$ php composer.phar global update
The search command allows you to search through the current project's package repositories. Usually this will be just packagist. You simply pass it the terms you want to search for.
$ php composer.phar search monolog
You can also search for more than one term by passing multiple arguments.

show

To list all of the available packages, you can use the show command.
$ php composer.phar show
If you want to see the details of a certain package, you can pass the package name.
$ php composer.phar show monolog/monolog

name : monolog/monolog
versions : master-dev, 1.0.2, 1.0.1, 1.0.0, 1.0.0-RC1
type : library
names : monolog/monolog
source : [git] http://github.com/Seldaek/monolog.git 3d4e60d0cbc4b888fe5ad223d77964428b1978da
dist : [zip] http://github.com/Seldaek/monolog/zipball/3d4e60d0cbc4b888fe5ad223d77964428b1978da 3d4e60d0cbc4b888fe5ad223d77964428b1978da
license : MIT

autoload
psr-0
Monolog : src/

requires
php >=5.3.0
You can even pass the package version, which will tell you the details of that specific version.
$ php composer.phar show monolog/monolog 1.0.2

depends

The depends command tells you which other packages depend on a certain package. You can specify which link types (require, require-dev) should be included in the listing. By default both are used.
$ php composer.phar depends --link-type=require monolog/monolog

nrk/monolog-fluent
poc/poc
propel/propel
symfony/monolog-bridge
symfony/symfony

validate

You should always run the validate command before you commit your composer.json file, and before you tag a release. It will check if your composer.json is valid.
$ php composer.phar validate

status

If you often need to modify the code of your dependencies and they are installed from source, the statuscommand allows you to check if you have local changes in any of them.
$ php composer.phar status
With the --verbose option you get some more information about what was changed:
$ php composer.phar status -v
You have changes in the following dependencies:
vendor/seld/jsonlint:
M README.mdown

self-update

To update composer itself to the latest version, just run the self-update command. It will replace your composer.phar with the latest version.
$ php composer.phar self-update
If you would like to instead update to a specific release simply specify it:
$ composer self-update 1.0.0-alpha7
If you have installed composer for your entire system (see global installation), you may have to run the command with root privileges
$ sudo composer self-update