使用 VPS 建立 WordPress 主頁

在使用 BandwagonHost 建置 ShadowsSocks 翻牆伺服器後,對於 VPS 這種半管理式的租用方式很滿意,同時因為是具備 root 管理權限的伺服器,所以還可以用來建置一些其他的網路伺服器。

最普遍的就是用它來建立具備 Nginx/MySQL /MariaDB/PureftpD 的網頁服務器,再在它之上用 WordPress 建置主頁,省去另外再租用 WordPress 主頁空間的成本。

同時因為我已經擁有許多不同域名,所以不必再購買域名,只要把域名指向新的網頁主機位址即可。

Read more

BandwagonHost (搬瓦工) VPS 架設 ShadowSocks 翻牆伺服器

最近在觀察中國大陸的網路生態,除了眾所注目的行動支付及網路金融外,另一個就是因應 GFW 而發展出來的科學上網的衍生性網路服務。

其中最為人所注目的就是暱稱為搬瓦工的 BandwagonHost 為首的 VPS (Virtual Private Server),為了吸引使用者安裝,發展出一鍵安裝的安裝工具。

因為剛好又自架伺服器的想法,又不想自己去處理不穩定的網路問題,因此使用 VPS 是一個絕佳的解決方案。

搬瓦工的網址如下。

Read more

Skype ID 和 Skype To Go 的設定 (US only)

若是你有美國電話號碼,Skype 提供兩個額外服務,Skype ID 和 Skype To Go.

Skype ID 是 SkypeOut 的 CallerID, 若是你用 SkypeOut 撥打美國本土電話號碼時,可以顯示 Skype ID, 這樣子對方的電話會顯示事先設定的 Skype ID, 可以即時回撥這個電話號碼。而不會顯示一般的 SkyeOut ID,不過如果是國際電話的話,就還是只能顯示當地的代表號,像是台灣的就是 02-7731-4096

Read more

取得及設定 Google Voice 美國門號搭配 Hangout 免費打美國電話

Google Voice 是 Google 在幾年前推出的一項服務,目前只在美國提供服務。簡單地說,它提供你一組免費美國的電話號碼,當別人撥打這個電話號碼時,它會轉接到你設定的另一個門號,因此你只要提供給朋友你的 Google Voice 號碼,未來你再更換電話門號時,可以重新設定電話號碼連結,所以你不必再重新給朋友新的電話,Google Voice 的轉接服務會幫你轉接到你設定的新門號。

由於美國有不少網路電話的公司都提供免費的美國門號,因此你可以搭配 Google Voice 的功能來使用,不必擔心門號被收回後,要不斷地向朋友門更新門號。當然,搭配一般行動電話門號和家用電話,也可以做到類似效果,讓你在搬家時,不必再更改電話號碼。

Read more

How to Work with GitHub and Multiple Accounts

Step 1 – Create a New SSH Key

We need to generate a unique SSH key for our second GitHub account.

ssh-keygen -t rsa -C "your-email-address"

Be careful that you don’t over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I’ve saved the file to ~/.ssh/id_rsa_work.

Step 2 – Attach the New Key

Next, login to your second GitHub account, browse to “Account Overview” and attach the new key, within the “SSH Public Keys” section. To retrieve the value of the key that you just created, return to the Terminal and type: vim ~/.ssh/id_rsa_COMPANY.pub.

Copy the entire string that is displayed, and paste this into the GitHub textarea. Feel free to give it any title you wish.

Next, because we saved our key with a unique name, we need to tell SSH about it. Within the Terminal, type: ssh-add ~/.ssh/id_rsa_COMPANY. If successful, you’ll see a response of Identity Added.

Step 3 – Create a Config File

We’ve done the bulk of the workload; but now we need a way to specify when we wish to push to our personal account, and when we should instead push to our company account. To do so, let’s create a config file.

touch ~/.ssh/config vim config

If you’re not comfortable with Vim, feel free to open it within any editor of your choice. Paste in the following snippet.

Default GitHub


	Host github.com
	  HostName github.com
	  User git
	  IdentityFile ~/.ssh/id_rsa

This is the default setup for pushing to our personal GitHub account. Notice that we’re able to attach an identity file to the host. Let’s add another one for the company account. Directly below the code above, add:

	Host github-COMPANY
	  HostName github.com
	  User git
	  IdentityFile ~/.ssh/id_rsa_COMPANY

This time, rather than setting the host to github.com, we’ve named it as github-COMPANY. The difference is that we’re now attaching the new identity file that we created previously: id_rsa_COMPANY. Save the page and exit!

Step 4 – Try it Out

It’s time to see if our efforts were successful. Create a test directory, initialize git, and create your first commit.

	git init
	git commit -am "first commit'

Login to your company account, create a new repository, give it a name of “Test,” and then return to the Terminal and push your git repo to GitHub.

	git remote add origin git@github-COMPANY:Company/testing.git
	git push origin master

Note that, this time, rather than pushing to [email protected], we’re using the custom host that we create in the config file: git@github-COMPANY.

Return to GitHub, and you should now see your repository. Remember:

When pushing to your personal account, proceed as you always have. For your company account, make sure that you use git!github-COMPANY as the host.