熱門文章

2016年6月17日 星期五

[Openshift]使用 rhc 下載複製(clone)程式碼

➜  ~ git:(master) rhc setup
OpenShift Client Tools (RHC) Setup Wizard

This wizard will help you upload your SSH keys, set your application namespace, and check that other
programs like Git are properly installed.

If you have your own OpenShift server, you can specify it now. Just hit enter to use the server for
OpenShift Online: openshift.redhat.com.
Enter the server hostname: |openshift.redhat.com| 

You can add more servers later using 'rhc server'.

Login to openshift.redhat.com: qjpioneer@gmail.com
Password: ********

OpenShift can create and store a token on disk which allows to you to access the server without using your
password. The key is stored in your home directory and should be kept secret.  You can delete the key at
any time by running 'rhc logout'.
Generate a token now? (yes|no) yes
Generating an authorization token for this client ... lasts about 1 month

Saving configuration to /Users/QJpioneer/.openshift/express.conf ... done

Checking for git ... found git version 2.7.4 (Apple Git-66)


Checking common problems .Enter passphrase for /Users/QJpioneer/.ssh/id_rsa: 


rhc setup

enter

email
pw
yes




今天因為修改了架設在openshift上的wordpess 的後台位置,導致我無法正常連上後台(前台都正常),回到openshift的頁面才發現,我設置的是scalable app所以無法直接安裝phpmyadmin

Installing phpMyAdmin on openshift scalable app

其中有要設置 rhc 


參考1. stackoverflow

Remove the keys: rhc sshkey-remove You can also delete them from the management console, by going to https://openshift.redhat.com/app/console/settingsOnce done, upload the public key (copy the content of your id_rsa.pub to management console) :https://openshift.redhat.com/app/console/keys/newSave it. After this try to git clone and it should work for you.

參考2. 怎樣使用git把程式碼搬到OpenShift?

我在設定 rhc setup 時搞了很久,才發現必須先按一個enter,下一行才是輸入信箱與密碼來登入openshift,在這裡失敗了好就都不知道爲什麼....

Unable to connect to the server (getaddrinfo: nodename nor servname provided, or
not known (ssh:443)). Check that you have correctly specified your OpenShift
server
'https://ssh//56c968760c1e6696010000d5@wp-qjpioneer.rhcloud.com/~/git/wp.git/'.
這部分成功後,又卡在
Checking common problems .Enter passphrase for /Users/QJpioneer/.ssh/id_rsa: 
Enter passphrase for /Users/QJpioneer/.ssh/id_rsa: 
Enter passphrase for /Users/QJpioneer/.ssh/id_rsa: 


An SSH connection could not be established to my-qjpioneer.rhcloud.com. Your SSH configuration may not be
correct, or the application may not be responding. Could not parse PKey: no start line (ArgumentError)

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.
這裡我不知道要輸入什麼,找了很久(還用finder去找這個資料夾,不知怎麼看OS X系統(Mac)的隱藏資料夾而繞了一大圈,也不在裡面。

後來才想到跟git 有關,去github 也沒有....最後最後,因為我有用evernote記錄註冊的帳號密碼(當然,重要的事不會記在這),終於被我找到了

輸入後可以成功clone檔案到本機了!!
接下來才是安裝phpmyadmin的步驟啊...

2016年6月16日 星期四

澳洲2年田野觀察之我眼裡的澳洲人(轉)

因為第一次在外國人的土地上,生活那麼久,看來看去,有些小事著實讓我感到文化大不同,甚至感到”詫異”的程度。

一、【外國人洗碗,只用洗碗精,完全不需用水沖淨!】
  台灣的路邊小吃店,店家通常會放一大盆加洗碗精的水,先清潔一遍,另外還有一盆清水,再來過水一下,(這種大略的洗碗方式有噁心到)。而外國人其實也是這種邏輯,只是他們會把水槽放超燙的熱水加洗碗精,刷洗一下,(感覺好像很去油,對不對!)緊接著就放在晾乾的平台上,或者比較勤快的人,就會直接用布把所有碗盤”擦”淨。是的,外國人是用” 擦”的方式,企圖把洗碗精”擦掉”,老天,他們不用水”沖”耶!化學物不會殘留嗎?!倒致我每次在澳洲房東家,使用鍋碗瓢盆的時候,內心都會有疙瘩,剛開始使用前,還會用水沖一下,後來轉個念,外國人還不是都活得好好地,就~入境隨俗地接受這些殘留了…。

二、【老外好浪費】之盤子裡老是剩好多食物
  每次去餐廳吃飯,看到老外完食以後,一定會剩下好多薯條,甚至還有留下主食肉塊或魚排,更令人不解的是,我還常常看到,幾乎只吃3口就放下餐具,餐盤菜肴呈現幾乎完好狀態,而我們台灣人總是吃的剩下盤子而已。心想~你們媽媽都沒有教過”粒粒皆辛苦”嗎?!真是有夠浪費啊!(內心:好想把他們盤子的食物拿來吃)

三、【老外餐點一定附薯條,但絕無附贈蕃茄醬】

  每次吃外食,不管吃雞豬魚牛,餐點一定附薯條,但是店家只提供鹽巴、白醋與雞粉,絕不附贈蕃茄醬,而小小一盒30g介於眼霜與面霜大小的蕃茄醬就要價1元,(超市買一大瓶蕃茄醬才2元),在台灣速食店吃薯條,想拿多少蕃茄醬就可以擁有多少的隨興度相比,澳洲店家真是嚴重地無法體恤顧客,有時候我實在太渴望蕃茄醬,花錢買了一盒根本沾不到最後10根薯條的迷你蕃茄醬,在吃薯條的途中,內心無法放肆地沾蕃茄醬,真是好絕望啊。另外,餐點除了一定附薯條以外,也必定會有配菜沙拉,同樣地,店家只提供鹽巴、白醋與雞粉,絕對不附贈沙拉醬,有些稍微有良心的餐廳會加幾咪沙拉醬,但是一樣無法佈滿每一片葉子啊~~~。

四、【三個一般般,四個剛剛好】之外國小孩生好多

  當我走在路上或超市裡,常常看見迎面而來,一幅美好的家庭圖像,爸爸抱著一個小孩,媽媽推著嬰兒車(裡面當然有個可愛的嬰兒),身邊跟著2個可以自行走路的大小孩,這種1組父母搭配4個小孩的家庭人口,散落於澳洲街頭,這就是個有希望的國家啊!沒有人口老化的問題,不用像我們以後1個年輕人要扛2個老人在肩頭。聽澳洲同事說,他們生1個小孩可以拿到5仟元澳幣,近15萬台幣啊!還真有些紐西蘭人就在澳洲生小孩,賺這個生子費呢!現在台灣年輕人,生一個都考慮好久,哪敢生到第3個啊!

五、【嬰兒趴趴走吹風】之外國媽媽沒在怕的

  在這裡走在路上,常常看到大概出生不到幾天的超小嬰兒,被爸媽帶出門溜一溜,媽媽才生完,也完全不用閉關,不管白人、印度人,好像是只有我們華人才有護身習俗啊?!而且我還有目擊過,媽媽放任超小嬰兒在草地上爬來爬去的案例,完全大自然狀,外國媽媽真的沒在怕的。最近看到英國王妃凱特生子完隔天,就抱著小王子出院,與威廉王子站的好好地,與全世界見面,這就是外國人與華人好不同的顯例。

六、【外國人頭型好圓】之為什麼那麼不公平

  外國小孩每一個都在比可愛的,每一個都超可愛,這件事我想大家都知道,而且天知道為什麼外國人的頭型都好圓啊,他們到底是怎麼睡覺的?為什麼為什麼為什麼呢?(無聊的不平短篇結束)

七、【狗不叫】之外國狗怎麼可以乖成這樣

  在超市門口的中庭,常常看到狗狗獨立地自己坐在那裡,因為主人都非常放心地逛街採買去了,狗狗被主人隨興綁在門廊的柱子上,不會對著路上亂叫,或著想掙托暴走,他們乖乖地坐著等主人,而且眼神非常的peaceful,大概這裡每隻狗都是B型的吧哈哈(大家有看過日本節目,對兒童進行的有趣血型性格實驗嗎)


2016年6月15日 星期三

雪山 NSW trainlink 季節性票價優惠時段

Discounted seasonal fares and tickets

Seasonal faresOur busiest times are around school holidays, so if you're happy to travel at other periods, you can save up to 30% on the full adult fare.
There are three types of seasonal fares for adults:
  • Peak - normal fares apply
  • Shoulder - 15% discount
  • Low - 30% discount.
As pensioners and seniors receive a 50% discount on the full adult fare all year round, no further discounts apply.
The table below shows the dates of upcoming seasonal fares. When you book online the seasonal fare is automatically displayed.
Keep an eye out for monthly fare specials and extra discounts for online bookings. 
Upcoming seasonal periods
Peak season
(normal fares)
20 March 2016 to 1 May 2016
Low season
(30% discount)
2 May 2016 to 30 June 2016
Peak season
(normal fares)
1 July to 17 July 2016
Low season
(30% discount)
18 July 2016 to 31 July 2016
Shoulder season
(15% discount)
1 August 2016 to 24 September 2016
Peak season
(normal fares)
25 September 2016 to 9 October 2016
Shoulder season
(15% discount)
10 October 2016 to 15 December 2016
Peak season
(normal fares)
16 December 2016 to 29 January 2017
Low season
(30% discount)
30 January 2017 to 12 April 2017
Peak season
(normal fares)
13 April 2017 to 28 April 2017
Low season
(30% discount)
29 April 2017 to 29 June 2017
Peak season
(normal fares)
30 June 2017 to 17 July 2017
Low season
(30% discount)
18 July 2017 to 31 July 2017
Shoulder season
(15% discount)
1 August 2017 to 21 September 2017
Peak season
(normal fares)
22 September 2017 to 9 October 2017
Shoulder season
(15% discount)
10 October 2017 to 14 December 2017

闇黑網賺研究室

http://yamimoney.com

openshift + cloudflare 教學

Openshift CloudFlare rhcloud.com

http://stackoverflow.com/a/26337432/6095895

It's a bit unusual, but when using services like Openshift/Heroku etc, there is no A record for the domain in your DNS. This is because there is no single A record corresponding to your site or app on the service.
If you've already set up the domain at your registrar using Cloudflare's nameservers (you need to do this!) there should be no need to do anything else at the registrar.
You need to set up one (or more) CNAMEs for the site/app at Cloudlare (if it's a website, you may want one each for e.g. example.com and www.example.com).
Assuming you do need the 'naked' domain and the www version, you'd do this:

Openshift

  1. Make sure you have domains set up for both the 'naked' domain and the www subdomain.

Cloudflare:

Back it up!

  • Cloudflare lets you export your DNS settings; do this before making any changes.

Naked domain

  1. go to the DNS settings page
  2. choose CNAME from the selector at bottom
  3. enter the-domain in the first field
  4. enter the-domain.rhcloud.com in the second ("is an alias of") field

www subdomain

  1. repeat steps 1-4 from above, but enter www for step 3.
  2. go to the "Page Rules" page
  3. add a new "page forwarding" rule that either:
    • redirects http://the-domain.com/* to http://www.the-domain.com/$1 or
    • redirects http://www.the-domain.com/* to http://the-domain.com/$1
    • choose '301' for the redirect type



此教學也使用 openshift +  https://my.freenom.com/ 的免費頂級網域


http://yamimoney.com/archives/759
闇黑網賺研究室,openshift +wordpress


美國軟體工程師求職經驗

https://github.com/terry77228/UCSC-extension-for-Taiwanese/wiki

Welcome to the UCSC-extension-for-Taiwanese wiki!

這邊是我用來記錄我在UCSC extension念computer programming以及在美國求職的經驗

澳洲 露營車 攻略

露營車