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
bind -x '"\C-o": READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT} | |
`git symbolic-ref HEAD | cut -d/ -f 3` ${READLINE_LINE:${READLINE_POINT}}"' |
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 | |
$GLOBALS['memstart'] = memory_get_usage(); | |
function mem() { | |
$m2 = memory_get_usage(); | |
echo $m2 - $GLOBALS['memstart'] ."\n"; | |
} | |
class Foo { | |
public function bar($x = null){ |
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 | |
Class TableRII extends RecursiveIteratorIterator { | |
private $parentKey = null; | |
public function beginIteration() { | |
echo '<table border=1><tr><th>key</th><th>value</th></tr>'; | |
} | |
public function endIteration() { | |
echo '</table>'; |
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 | |
/** | |
* stream wrapper for variable input | |
* usage: | |
* $val = 'Hello <?php echo "World"; ?> hehe.'; | |
* stream_wrapper_register("var", "VariableStream"); | |
* include("var://".urlencode($val)); | |
**/ | |
class VariableStream { | |
public $position; |
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/bash | |
# | |
# Startup script for onMemoryMySQL | |
# chkconfig: 345 85 15 | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin:/bin | |
test -f /root/onMemoryDeploy.sh || exit 0 |
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 | |
MYSQL=/etc/rc.d/init.d/mysql | |
MEMDIR=/dev/shm | |
MEM_MYSQL=$MEMDIR/mysql | |
LIBDIR=/var/lib | |
ORIGDIR=$LIBDIR/mysql |
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
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 |
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
Receiver | |
nc -l 12345 > hoge | |
Sender | |
dd if=/dev/zero of=tempfile bs=1M count=100 | |
time `cat tempfile | nc ReceiverServer 12345` |
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
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 |
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 | |
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" |