This file contains hidden or 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
$array = array( | |
array( | |
'name' => 'sato' | |
, 'sales' => 100 | |
) | |
, array( | |
'name' => 'suzuki' | |
, 'sales' => 200 | |
) | |
, array( |
This file contains hidden or 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
パーティション確認 | |
SHOW CREATE TABLE table_name; | |
どのパーティションが使われるか確認 | |
EXPLAIN PARTITIONS SELECT * FROM table_name WHERE hoge = fuga; | |
This file contains hidden or 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
ls /proc/$(pgrep nginx -U nginx | head -n 1)/fd | wc -l |
This file contains hidden or 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
-A 全情報表示 | |
-n DEV 送信、受信パケットに関する情報 | |
-n EDEV エラーパケットに関する情報 | |
-u CPUの利用状況 | |
-b ディスクIO | |
-r メモリとスワップ | |
-W 秒あたりのスワップ情報 | |
-q ロードアベレージ | |
sar -A -f sa10 |
This file contains hidden or 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
/** | |
* 配列の特定のキーを元にソートする | |
* @param array $array | |
* @param string $sortKey | |
* @param int $sortType | |
*/ | |
function sortArray( &$array, $sortKey, $sortType = SORT_ASC ) { | |
$tmpArray = array(); | |
foreach ( $array as $key => $row ) { |
This file contains hidden or 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
【直前のコミットのメッセージを変更】 | |
git commit --amend -m "メッセージ" | |
【共有リポジトリに存在しないブランチが"git br -a"で表示される場合の対処法】 | |
git fetch --prune | |
【共有リポジトリで削除したブランチをローカルリポジトリからも削除】 | |
git remote prune origin | |
This file contains hidden or 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/sbin/nginx -s reload |
This file contains hidden or 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
インストール済み確認 | |
yum list installed | |
インストール前にパッケージの情報を取得 | |
yum info php |
This file contains hidden or 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
php_sapi_name() |
This file contains hidden or 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
class Hoge { | |
// 何かしらの処理 | |
} |
OlderNewer