etc/sysconfig/network-scripts/ifcfg-eth0

The interface configuration file controls the software interface of individual network devices. The system uses these files at boot time to decide which interface to activate and how to configure. These files are usually named ifcfg-name. Name refers to the name of device controlled by the configuration file.

Ethernet interface
etc/sysconfig/network-scripts/ifcfg-eth0 is one of the most common interface files. It controls the system’s first Ethernet network interface card or NIC. In a system with multiple NICs, there are multiple ifcfg-ethx files. Because each device has its own configuration file, the administrator can control how each interface works separately.

[vagrant@localhost tests]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"

何!?

onboot=”yes”

yes- the device must be activated at boot time.
no – this device does not need to be activated at boot time

sed -i -e "s/ONBOOT=no/ONBOOT=yes/" /etc/sysconfig/network-scripts/ifcfg-eth0

sed -e -i “s/hoge/foo/g” index.php

sed command
commands that can replace all strings, extract them on a line by row basis, delete them, and perform various text processing. Process contents can be specified by command line parameters, and batch processing can be done non-interactively.

-e: specify processing content
-i : replace the file without outputting the result.

echo "hoge";
[vagrant@localhost tests]$ ls
index.php  test
[vagrant@localhost tests]$ sed -i -e 's/hoge/foo/g' index.php
[vagrant@localhost tests]$ cat index.php

echo "foo";

すげーーーーーーーーーーーー

“tree” | useful linux command for making directory configuration diagram

If you are in development project, occasionally there are cases to make directory charts, but if you use linux “tree” command, you can make it in short.
Really?

First of all, prepare for the simple files.

[vagrant@localhost tests]$ tree -d
-bash: tree: コマンドが見つかりません

なにいいいいいいいいいいいいいいいいいいいいいいいい?
linuxでデフォルトで入ってるんちゃうんかい。。。

# sudo yum install tree

インストール:
  tree.x86_64 0:1.5.3-3.el6
完了しました!
[vagrant@localhost tests]$ tree
.
├── asset
│   ├── css
│   │   └── style.css
│   └── js
│       └── app.js
└── index.php

3 directories, 3 files

ooooooooooooooooooooooooooo, shaddy!!!!!!!!!

[vagrant@localhost tests]$ git clone https://github.com/githubix/test.git
Initialized empty Git repository in /home/vagrant/local/app/tests/test/.git/
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 45 (delta 4), reused 4 (delta 0), pack-reused 3
Unpacking objects: 100% (45/45), done.
[vagrant@localhost tests]$ ls
index.php  test
[vagrant@localhost tests]$ tree
.
├── index.php
└── test
    └── test.php

1 directory, 2 files

すげーーーーーーーーーーーーーーーーーー
やべーーーーーーーーー

いや、待て。markdownの書き方だ。。うむーExcelか?

What will happen if try to put in excess data type on mysql

mysql> create table news(
    -> id int auto_increment PRIMARY KEY,
    -> content varchar(10)
    -> );
Query OK, 0 rows affected (0.25 sec)

mysql> insert into news(news) values('テスト');
ERROR 1054 (42S22): Unknown column 'news' in 'field list'
mysql> insert into news(content) values('テスト');
Query OK, 1 row affected (0.04 sec)

mysql> select * from news;
+----+-----------+
| id | content   |
+----+-----------+
|  1 | テスト    |
+----+-----------+
1 row in set (0.00 sec)

mysql> insert into news(content) values('10byte以上を入れてみたいと思う.さてどうなるでしょうか?');
Query OK, 1 row affected, 1 warning (0.10 sec)

mysql> select * from news;
+----+--------------------+
| id | content            |
+----+--------------------+
|  1 | テスト             |
|  2 | 10byte以上を入     |
+----+--------------------+
2 rows in set (0.00 sec)

If I enter an amount that exceeds data type, only the acceptable number of bytes will be in the record.

TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT

TINYTEXT
character type large object column, maximum length is 255(2^8 -1) characters.

TEXT
Character type large object column, maximum length is 65,535(2^16 – 1) characters.

MEDIUMTEXT
Character type large object column, maximum length is 16,777,215(2^24 – 1) characters.

LONGTEXT
Character large object column, maximum length is 4,294,967,295(2^32 – 1) characters.

Let’s get started.

mysql> create table news(
    -> id int,
    -> news mediumtext
    -> );
Query OK, 0 rows affected (0.54 sec)

mysql> describe news;
+-------+------------+------+-----+---------+-------+
| Field | Type       | Null | Key | Default | Extra |
+-------+------------+------+-----+---------+-------+
| id    | int(11)    | YES  |     | NULL    |       |
| news  | mediumtext | YES  |     | NULL    |       |
+-------+------------+------+-----+---------+-------+
2 rows in set (0.03 sec)

すげー、なるほど^^

Processing flow of Code Deploy

The CodeDeploy agent for each instance polls CodeDeploy to decide what to retrieve from when specified Amazon S3 bucket or GitHub repository.

The CodeDeploy agent for each instance gets the target revision from the Amazon S3 bucket or GitHub repository and uses the appspec file procedure to deploy the content to the instance.

書評: KAIZEN JOURNEY 市谷聡啓著

たった1人からはじめて、「越境」するチームをつくるまで

推薦されたので、読了した。
最初、「越境」という意味が、国境を超える、と思っていたのだが、そうではなくて、一歩踏み出す、という意味だ。
本書はソフトウェア開発における悩みやその解決のアプローチ方法を多数提示している。よって、環境や立場は異なるが、各登場人物の心境に共感できることが多く、読み物として楽しめる。俯瞰して読むことで、チーム開発においては、身勝手な行動は一切慎むべきだということが手に取るようにわかる。また、突き詰めると、エンジニアや当事者のスキルセット次第ということもよくわかる。スキルが足りないと、コミュニケーションミスが齟齬が起きやすいように感じた。