【美國加州 Yosemite National Park】優勝美地國家公園健行之一.迷人的秋日美景。飽覽山谷與Vernal Falls、Nevada Falls兩大瀑布

圖片
「一生必去」這4個字的最高等級用語,絕對可以用來形容美國加州的「優勝美地國家公園」(Yosemite National Park),相信沒有人會反對。因為它在世界上的地位,彷彿就是「大自然的大教堂」。
優勝美地國家公園(Yosemite National Park),是美國國家公園內極為閃耀的一顆明珠,地處加州東北部,內華達山脈的西麓,曾是印第安原住民阿瓦尼奇人(Ahwahneechee)的故鄉。公園的範圍橫跨加州中西部圖奧勒米縣(Tuolumne)、馬里波薩縣(Mariposa)和馬德拉縣(Madera)。優勝美地國家公園於於1984年被納入聯合國教科文組織(UNESCO)世界遺產,每年吸引4百萬來自世界各地的遊客前來觀光。
優勝美地國家公園內,有超過95%的土地被指定為原生地域(wilderness),為了要保護公園的原貌,美國總統林肯於1864年6月30日,將優勝美地谷蝴蝶林(Mariposa)內的美洲衫巨木林,設為美國的第一座州立公園。並且在「國家公園之父」約翰•繆爾(John Muir,1838~1914)這位作家、科學家、保育先知的倡議之下,於1890年成為第二座國家公園。它幾乎是全美甚至全球最受歡迎的國家公園。
公園內除了有四面絕壁的優勝美地山谷,還有充滿高山美景的圖奧勒米牧場,自然風光令人歎為觀止。而它的美和大遠遠超過一般人所暸解,公園的佔地面積超過1,169平方英哩/284,899 公頃,而其中最多遊客造訪的的優勝美地谷(Yosemite Valley),只佔了整個公園不到1%的面積。優勝美地國家公園主要有四大景區,呈F型分佈,分別是優勝美地谷(Yosemite Valley)、山頂的冰川點(Gracier Point)、北側的第奧嘉(Tioga Pass)以及南端的瓦沃納(Wawona)景區。這次的優勝美地之旅,只有北側的第奧嘉景區沒有造訪,那裡就留待下次不同季節再去造訪吧!

優勝美地山谷在上一次冰河時期被冰川覆蓋,山谷呈U字型,兩旁峭壁上到處可見由冰川切削過的痕跡,其中最有名的就是半圓頂(Half Dome),這顆巨岩是冰河時期所形成的,峰頂海拔2,693公尺,歷時8,700萬年,在地質與歷史上他就是個不折不扣的巨人。只要你在優勝美地國家公園內,走到比較高的地點,幾乎從任何地方,都可以看到它的身影,據說 North Face 品牌 logo 的…

Running PHP application on Heroku (Mac OS X)


Heroku is a very popular PaaS (Platform as a Service) cloud hosting service which allows you to deploy various applications, especially Ruby on Rails application. Heroku doesn't charge anything to sign up and has a free service upto 5 MB usage of PostgreSQL database, that's enough to used for your development environment. Heroku is majorly to Deploy Ruby on Rails, Node.js, Java, Clojure and Django apps, but you can also run any type of app (like PHP).

The PHP support was launched in partnership with Facebook, to attract Facebook application  developers to Heroku's cloud platform (Heroku support PHP). In this post, you will learn how to deploy PHP project on Heroku. I assume that you already signed up with Heroku and configured your SSH keys with Heroku servers. If you haven't done it already, follow these instructions.

You can try it out for yourself by just creating a new project folder with an index.php file in it, then creating a Heroku project. When you push to Heroku, they'll automatically identify it as PHP and compile/install Apache and PHP into your slug.

$ mkdir PROJECT_NAME
$ cd PROJECT_NAME
$ git init
$ git add .
$ git commit -m "Initial commit"

Go to github.com and create a new repository

$ git remote add origin git@github.com:YOUR_USER_NAME/PROJECT_NAME.git
$ git push origin master

Installing the heroku command line client:
If you are using a Mac, install the following version of the heroku command line client (toolbelt). http://toolbelt.herokuapp.com/osx/download

Creating an application on heroku is easy, you just need to run the following command:

$ heroku create PROJECT_NAME --stack cedar

Heroku uses PostgreSQL as its default database but also support MySQL. You can use either Heroku's Postgres-based shared DB storage or a cloud-hosted MySQL like Amazon RDSClearDB MySQL Database or Xeround Cloud DB for your PHP apps on Heroku. (Amazon RDS is a service that allows you to set up, operate and scale a dedicated MySQL database server on top of EC2. You can use Amazon's Relational Database Service (RDS) addon on Heroku.)

$ heroku addons:add shared-database:5mb

Retrieve the database credentials by following command:

$ heroku config

Now, the fun part – push the modified code up to Heroku with git push heroku master:

$ git push heroku master

The output should look something like this:

If you get this error below, make sure the index.php file is under your project folder, and run the command: $ git add .

Setting up database:

I'm familiar with MySQL database, that why I'm choosing ClearDB MySQL database with FREE plan. Run the following command to install the addon:

$ heroku addons:add cleardb:ignite
$ heroku config

$ heroku config:add DATABASE_URL=mysql://db_user:password@db_server/db_schema

How do I import a MySQL dumpfile into the database?

$ mysql -u db_user -p -h db_server db_schema < db_dump_file.sql

Now you can login to mysql server from unix shell or GUI tool (like MySQL Workbench) to check your database.

Finally, you may want to change the database setting in the PHP project. (For this example, I have to configure my config.class.php file)

After that, run the following command:

$ git commit -am "Changed db setting to MySQL"
$ git push heroku master

Congratulations! you've just created your PHP application on Heroku. :)
or just run "$ heroku open"

You can use the "$ heroku logs" command to retrieve this log stream (in streaming mode if you add the –tail options).

Heroku Documentation:


Have fun!

熱門文章

[轉載] 洛克菲勒寫給兒子的38封信(全文)

2013.5.25~26【新阿溪縱走】眠月線鐵道線探勘。順登松山、萬歲山、小笠原山、對高岳

2018, Jan 14【高雄】旗津半日遊&不老溫泉度假村泡湯&南橫公路梅山口賞梅花

[平成26年12月9日]冬の山旅日記~日帰り雪山ハイク!!蔵王温泉、銀山温泉、日本百名山・蔵王山(熊との遭遇)

斗六市70年老店 山姆紅燒羊肉爐

【南投信義】玉山國家公園散步★塔塔加六山之三:鹿林山、麟趾山、鹿林前山&八通關古道之雲龍瀑布健行

2012 アルプスの夏:飛騨・北阿爾卑斯山脈南部の焼岳/槍・穂高連峰/表銀座単独縦走記錄。Day5 穗高岳山莊~涸沢岳~北穂高岳~飛騨泣き~A沢のコル~長谷川ピーク~大キレット~南岳小屋

文章列表

聯絡我

名稱

以電子郵件傳送 *

訊息 *