Sorry, this entry is only available in 日本語.
All posts by Kenji
OpenShift: How to login with ssh
The way to login OpenShift server with ssh.
Tested Environment
- OS: Ubuntu
- rhc 1.38.4
- Openshift Gear: 1 small
Preparation
Register ssh public key on OpenShift Web console.
The Way to Login
Use rhc
Add OpenShift application name after rhc ssh
. For example, if you use app-domain.rhcloud.com
, then execute rhc ssh app
.
If you have not saved authenticate token on your local machine, you will be required to input password. Authenticate token can be saved with the command rhc setup
.
Use ssh
This is the way to use ssh without rhc.
Execute the ssh command on bottom right of OpenShift Web console. Or, execute rhc apps
and you can find ssh item like AAAAAABBBBBCCCCCCDDDDDD@app-domain.rhcloud.com
, then execute ssh command with its argument, ssh AAAAAABBBBBCCCCCCDDDDDD@app-domain.rhcloud.com
.
In this way, you don’t have to input password.
Rails: Realize nl2br in PHP
Here’s the code to realise nl2br
of PHP in Rails.
Environment
(Unless Rails changes considerably), it can be used in most versions.
- Rails 4.2.5
- Ruby 2.0.0
(日本語) 東銀座 パスタやカレーが580円 M’s Cafe 大盛無料
Summation of Lead the Formula
How much is the summation from 1 to 100?
ガウスがこの計算を即座にやってのけたという話はあまりに有名で、整数を順次足す、等差数列を順次足す方法はご存じの方も多いと思います。
よく使われる説明の方法として、石を三角の形に置き、それと点対象な三角の形に石を置くというのがあります。
Continue reading Summation of Lead the Formula