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
// 空エンティティ作成 | |
$customer = Mage::getModel('customer/customer'); | |
// 一件取得 | |
$customer = Mage::getModel('customer/customer')->load(1); | |
// 全件 | |
$customers = Mage::getModel('customer/customer')->getCollection()->getData(); |
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 -r "echo strpos('ABC999999', 'ABC9');" |
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
# 標準のchmodコマンドでは再帰実行できないため、以下のコマンドで応用して対応できます。 | |
#ディレクトリのパーミッションを変更 | |
find . -type d -exec chmod 775 {} \; | |
#ファイルのパーミッションを変更 | |
find . -type f -exec chmod 664 {} \; | |
#特定のファイル名を指定して実行 | |
find . -name *.jpg -exec chmod 664 {} \; |
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
SELECT NAME_OF_SEQ.NEXTVAL FROM DUAL; |
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
# さくら用 | |
<IfModule mod_deflate.c> | |
SetOutputFilter DEFLATE | |
AddOutputFilterByType DEFLATE image/svg+xml | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css |
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
sed -i -e "s/before/after/" /filt/to/path/name.txt |
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/apachectl -V | |
Server version: Apache/2.2.15 (Unix) | |
Server built: Oct 16 2014 14:48:21 | |
Server's Module Magic Number: 20051115:25 | |
Server loaded: APR 1.3.9, APR-Util 1.3.9 | |
Compiled using: APR 1.3.9, APR-Util 1.3.9 | |
Architecture: 64-bit | |
Server MPM: Prefork | |
threaded: no |
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
#更新日が1日前のファイルをリストアップ(現在の24時間前を起点にその過去24時間) | |
find . -mtime 1 | |
#更新日が1日以内のファイルをリストアップ(現在から24時間前まで) | |
find . -mtime -1 | |
# 分で指定する場合は↓ | |
find . -mmin -60 |
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
$ find . -type f -exec grep -l SEARCHTEXT {} \; |
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
Artisan::call('test:helloworld'); |