Reference: http://mail-archives.apache.org/mod_mbox/httpd-announce/201108.mbox/raw/%[email protected]%3E/
cd apache_source_code/modules/metadata
apxs -c mod_headers.c
apxs -ian headers mod_headers.la
#!/bin/sh | |
#put this shellcode on cake vendors directory, then do it. | |
# origin code from http://cakephp.lighthouseapp.com/projects/42648/phpunit-migration-hints | |
mkdir -p ~/tmp/cake_phpunit | |
wget --no-check-certificate https://github.com/sebastianbergmann/phpunit/tarball/3.5.5 -O ~/tmp/cake_phpunit/phpunit.tgz | |
wget --no-check-certificate https://github.com/sebastianbergmann/phpunit-mock-objects/tarball/1.0.3 -O ~/tmp/cake_phpunit/mock_objects.tgz | |
wget --no-check-certificate https://github.com/sebastianbergmann/php-code-coverage/tarball/1.0.2 -O ~/tmp/cake_phpunit/code_coverage.tgz |
# wget ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/pcre-6.6-2.el5_1.7.src.rpm | |
# rpm -ivh pcre-6.6-2.el5_1.7.src.rpm | |
# vi /usr/src/redhat/SPECS/pcre.spec | |
%configure --enable-utf8 --enable-unicode-properties | |
# rpmbuild -ba /usr/src/redhat/SPECS/pcre.spec | |
# rpm -Uvh /usr/src/redhat/RPMS/i386/pcre-6.6-2.7.i386.rpm /usr/src/redhat/RPMS/i386/pcre-devel-6.6-2.7.i386.rpm | |
<?php | |
// https://github.com/basuke/kiosk | |
//いつものw | |
function pr($data) { | |
echo "<pre>"; | |
print_r($data); | |
echo "</pre>"; |
$this->logQuery("db.{$Model->useTable}.update( :conditions :fields, :params )", | |
array('conditions' => $conditions, 'fields' => $fields, 'params' => array("multiple" => true)) |
Reference: http://mail-archives.apache.org/mod_mbox/httpd-announce/201108.mbox/raw/%[email protected]%3E/
cd apache_source_code/modules/metadata
apxs -c mod_headers.c
apxs -ian headers mod_headers.la
外部画像のサムネイル禁止、画像サイズ上限設定 | |
phpThumb.config.php | |
<?php | |
$PHPTHUMB_CONFIG['cache_maxsize'] = 1024 * 1024 * 1024; //キャッシュ画像全体の上限容量 1Gbyte | |
$PHPTHUMB_CONFIG['output_maxwidth'] = 1000; | |
$PHPTHUMB_CONFIG['output_maxheight'] = 1000; | |
$PHPTHUMB_CONFIG['nohotlink_enabled'] = true; //外部画像のサムネイル禁止 |
#!/bin/sh | |
CMDPATH=/usr/local/git/bin/ | |
CMD=git | |
test -f $CMDPATH$CMD || exit 0 | |
REPO_hoge_app="/usr/local/deploy/git/hoge" | |
REPO_hoge_app2="/usr/local/deploy/git/hoge2" |
Version 1.96 ------Sequential Output------ --Sequential Input- --Random- | |
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- | |
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP | |
test01 4G 998 99 141803 11 115324 17 5078 100 818801 54 3965 119 | |
Latency 10256us 256ms 405ms 2910us 1170us 14621us | |
Version 1.96 ------Sequential Create------ --------Random Create-------- | |
test01 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- | |
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP | |
16 321 1 +++++ +++ 447 1 333 1 +++++ +++ 449 3 | |
Latency 268ms 380us 91615us 189ms 463us 83468us |
Receiver | |
nc -l 12345 > hoge | |
Sender | |
dd if=/dev/zero of=tempfile bs=1M count=100 | |
time `cat tempfile | nc ReceiverServer 12345` |
normal view.ctp | |
102 req/sec 2,191calls 15,892 microsecs | |
------------------------------- | |
normal index.ctp&default.ctp | |
40 req/sec | |
turn off Html->link() on default layout | |
40 req/sec |