This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my @array1; # 配列 | |
# 3回入力する | |
for my $i (1..3) { | |
print $i."番目"; | |
chomp($array1[$i-1] = <STDIN>); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
for my $i (1..100) { | |
if ($i%15 == 0) { | |
print "FizzBuzz\n"; | |
} elsif ($i%5 == 0 ) { | |
print "Buzz\n"; | |
} elsif ($i%3 == 0 ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
#use strict; | |
#use warnings; | |
my @array = qw ( 0123 123 XXX); | |
print "表示:"."@array\n"; | |
my $num = join '-' , @array; | |
print "電話番号的なもの:"."$num\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you hit | |
rbenv install --list | |
There isn't 2.1.0. | |
You should try this. | |
cd "$(rbenv root)"/plugins/ruby-build && git pull | |
CentOS rbenv + ruby-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step1 | |
yum install iptables-services | |
Step2 | |
to start iptables 起動 | |
systemctl start iptables | |
to stop iptables 停止 | |
systemctl stop iptables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want to install php5.4, you have to introduce epel and remi to install php5.4. | |
If you don't have wget, you have to do this, but if you have wget, you don't need this step. | |
Step1. Install wget | |
sudo yum install wget -y | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar Jxvf FileName.tar.xz | |
or | |
tar -Jxvf FileName.tar.xz | |
If you get an error and don't have xz, you have to install this like below | |
sudo yum install xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you can't install ruby2.0 or later with rbenv, you should check you installed those already. | |
sudo yum -y install libyaml libyaml-devel zlib zlib-devel readline readline-devel openssl openssl-devel libxml2 libxml2-devel libxslt libxslt-devel | |
If you finish installing those, you can install ruby2.0 or later probably. | |
And you should confirm which you can install | |
rbenv install -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#httpd | |
sudo yum -y install httpd | |
sudo service httpd start | |
sudo chkconfig httpd on | |
#iptables | |
sudo service iptables stop | |
sudo chkconfig iptables off | |
#epel & remi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You have had to install ruby on your machine. | |
Update gem | |
gem update --system | |
Install rails without documents because it's going to be faster than with documents | |
gem install rails --no-ri --no-rdoc |
OlderNewer