Skip to content

Instantly share code, notes, and snippets.

View koji's full-sized avatar
🔍
I may be slow to respond.

koji koji

🔍
I may be slow to respond.
View GitHub Profile
@koji
koji / gist:1482469dbaa7df66e3c5
Created January 3, 2015 08:00
Install php 5.4 on CentOS6
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
@koji
koji / gist:32c64b16aa1269f4298f
Created January 1, 2015 20:26
How to install iptables on CentOS7(CentOS7のiptablesのインストール方法)
Step1
yum install iptables-services
Step2
to start iptables 起動
systemctl start iptables
to stop iptables 停止
systemctl stop iptables
@koji
koji / gist:4029fcebb382ce37c220
Last active August 29, 2015 14:11
Update ruby-build
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
@koji
koji / qw.pl
Created August 25, 2013 05:43
perl入学式 #3
#!/usr/bin/env perl
#use strict;
#use warnings;
my @array = qw ( 0123 123 XXX);
print "表示:"."@array\n";
my $num = join '-' , @array;
print "電話番号的なもの:"."$num\n";
#!/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 ) {
@koji
koji / sort.pl
Created July 21, 2013 07:48
Perl入学式
#!/usr/bin/env perl
use strict;
use warnings;
my @array1; # 配列
# 3回入力する
for my $i (1..3) {
print $i."番目";
chomp($array1[$i-1] = <STDIN>);