Skip to content

Instantly share code, notes, and snippets.

@sh2
sh2 / tpcc_load_parallel.sh
Created August 25, 2012 02:14
Parallel load script for tpcc-mysql
#!/bin/bash
# Configration
MYSQL=/usr/bin/mysql
TPCCLOAD=./tpcc_load
TABLESQL=./create_table.sql
CONSTRAINTSQL=./add_fkey_idx.sql
DEGREE=`getconf _NPROCESSORS_ONLN`
@sh2
sh2 / my.cnf
Created August 16, 2012 08:35
my.cnf for a windows laptop computer.
[mysqld]
console
## character set
character_set_server = utf8mb4
collation_server = utf8mb4_general_ci
## sql
sql_mode = TRADITIONAL
transaction_isolation = READ-COMMITTED
@sh2
sh2 / rtail.sh
Created August 8, 2012 01:55
Execute tail -f and watch a specific line on a remote host.
#!/bin/bash
TARGET_HOST=localhost
TARGET_FILE=/tmp/test.log
TARGET_LINE='^CRIT'
ssh $TARGET_HOST perl <<_EOF_
use strict;
use warnings;