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 | |
#how to use, mysqldumpslow mysql-slow.log > hoge | |
# php MysqldumpslowResult2Csv hoge > hoge.csv | |
$log_filename = $argv[1]; | |
echo 'SQL, Count, Time, Time(total), Lock, Lock(total), Rows_sent, Rows_sent(total), Rows_examined, Rows_examined(totao), Src'."\n"; | |
if (file_exists($log_filename)) | |
{ | |
$contents = file_get_contents($log_filename); |
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
## Invoke the ``dired'' of current working directory in Emacs buffer. | |
function dired () { | |
emacsclient -e "(dired \"${1:a}\")" | |
} | |
## Chdir to the ``default-directory'' of currently opened in Emacs buffer. | |
function cde () { | |
EMACS_CWD=`emacsclient -e " | |
(expand-file-name | |
(with-current-buffer (e2wm:current-buffer) default-directory))" | sed 's/^"\(.*\)"$/\1/'` |