brew install riak
riak起動(怒られる)
#!/bin/bash | |
schema_name="hoge" | |
for x in `mysql -N -u user -ppass -e "select TABLE_SCHEMA || '@' || TABLE_NAME from information_schema.tables where TABLE_SCHEMA = '${schema_name}';"`; | |
do | |
table_name=`echo ${x} | cut -d@ -f2`; | |
mysqldump -t -u user -ppass -w"last_update >= '2013-05-01 00:00:00'" --add-drop-table=false --insert-ignore ${_schema_name} ${_table_name} > ${_table_name}.sql | |
done |
#!/bin/bash | |
while getopts "i:h:n" opts | |
do | |
case $opts in | |
i) _MASTER_HOST=$OPTARG ;; | |
h) _MASTER_HOSTNAME=$OPTARG ;; | |
n) _DRYRUN="TRUE" ;; | |
esac | |
done |
octopress導入 http://blog.glidenote.com/blog/2011/11/07/install-octopress-on-github/
h2. clone
cd ~
git clone git://github.com/imathis/octopress.git octopress
cd octopress
git checkout -b master
find ./ -type f -exec md5sum {} \; > /tmp/checksums.md5 | |
md5sum -c /tmp/checksums.md5 |
#!/bin/bash | |
# http://futuremix.org/2011/02/rsync | |
# http://study.next-engine.net/rsync%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6.html | |
# パスの末尾に/をつけてもつけなくても大丈夫なようにsedする | |
from_dir=`echo $1 | sed -e "s|/$||"` | |
to_host_user=$2 | |
to_host=$3 | |
to_dir=`echo $4 | sed -e "s|/$||"` |
select | |
Z.TABLE_SCHEMA, | |
Z.TABLE_NAME, | |
Z.idx_column, | |
Z.CNT | |
from | |
( | |
select | |
Y.TABLE_SCHEMA, | |
Y.TABLE_NAME, |