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
# LogFormat "%h\t%{%Y-%m-%d %H:%M:%S}t\t%r\t%>s\t%b\t%D\t%{User-Agent}i" | |
cat /path/to/access.log |cut -f6,3 |sed -r 's!^(POST|GET)\s+(.+)\s+HTTP/[0-9]\.[0-9]\s+([0-9]+)$!\3\t\2!' | sort -nr | head -n100 |
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
// クロージャに変数が束縛されている | |
// 出力 | |
// 10,10,10... | |
for (var i = 0; i < 10; i++) { | |
setTimeout(function() { | |
console.log(i); | |
}, 1000); | |
} | |
// (匿名ラッパーで)変数をコピーして、クロージャが束縛する変数を変更 |
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
# prepare script | |
php_value auto_prepend_file /var/www/foo/append_subdir.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
<IfModule mod_rewrite.c> | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} !^/server-info | |
RewriteCond %{REQUEST_URI} !^/server-status | |
RewriteCond %{QUERY_STRING} ^(.*)subdir=(.*)$ | |
RewriteRule ^(.*)$ /rewrite_url.php?rawurl=$1 [QSA,L] | |
</IfModule> |
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 | |
/** | |
* HTTPレスポンス | |
* | |
* @since 2011-02-10 | |
* @version $Revision$ | |
* @modifiedby $LastChangedBy$ | |
* @lastmodified $Date$ | |
*/ |
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 | |
/** | |
* HTTPリクエスト | |
* | |
* @category tima | |
* @package tima_Request | |
* @since tima-beta ver.2007-04-01 | |
* @author IKEDA Youhey <[email protected]> | |
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 | |
* @copyright 2007 IKEDA Youhey |
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 | |
/** | |
* GoogleAnalytics - GoogleAnalyticsの解析タグ出力を補助 | |
* | |
* @since 2010-12-08 | |
* @version $Revision$ | |
* @modifiedby $LastChangedBy$ | |
* @lastmodified $Date$ | |
*/ |
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
#!/bin/sh | |
set -e | |
set -u | |
TEMP="/var/svn/tmp" | |
REPOS="/var/svn/repos" | |
SOURCE_HOST="svn.example.com" | |
USERNAME="admin-name" | |
PASSWORD="admin-pass" |
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 | |
/** | |
* Application model for Cake. | |
* | |
* @author IKEDA Youhei <[email protected]> | |
*/ | |
class AppModel extends Model { | |
/** encoding */ |
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 | |
/** | |
* レンダリングの実行結果をシフト JIS に変換 | |
* | |
* <p>「Layout」が無効だとコールバックされないので変換しません。<br /> | |
* フックが可能な出力処理の終端が「afterLayout」だから。<br /> | |
* また、処理の遷移が「Layout」有効/無効で処理ロジックが異なるため。</p> | |
* | |
* @author IKEDA youhei <[email protected]> |