This file contains 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
mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "truncate table $table" DATABASE_NAME; done |
This file contains 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
note = '''Note: You can use 'plus','minus','times','divide' and | |
'power' to calculate. Enter 'c' to clean and enter 'q' | |
to quit.''' | |
#note_1="Note: You can use 'plus','minus','times','divide' and " | |
#note_2="'power' to calculate. Enter 'c' to clean and enter 'q' " | |
#note_3="to quit." | |
#note=note_1+note_2+note_3 | |
note_4="Enter a algorithm(+ - * / ^):" | |
note_5='Enter a algorithm:' |
This file contains 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
root@ip-172-31-40-223:~/benchmark# cat big-seq-read.fio | |
[global] | |
nrfiles=1 | |
ioengine=libaio | |
bs=256K | |
size=2G | |
runtime=10s | |
time_based | |
group_reporting | |
new_group |
This file contains 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
package com.ore; | |
import android.app.ActionBar; | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentTransaction; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.graphics.Typeface; |
This file contains 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
var newShop = new Shop.model({ | |
"name": body.name, | |
"type": body.shop_type, | |
"context": body.context | |
}); | |
newShop.save() | |
.then(function(shop){ | |
return this.body = {retcode:0}; | |
}) |
This file contains 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
newShop.save() | |
.then(function(){ | |
return this.body = {retcode:0} | |
}) | |
.catch(function(err){ | |
console.log("catch: " + err); | |
/* | |
if(err) { | |
return this.body = {retcode: 1, message: err.errors}; | |
} else { |
This file contains 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
exports.create = function*(){ | |
var body = this.request.body, | |
name = body.name, | |
type = body.shop_type, | |
context = body.context; | |
/* | |
this.checkBody("name").notEmpty("请输入商户名称"); | |
this.checkBody("shop_type").notEmpty("请输入原料名"); |
This file contains 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
% gcc -v | |
Using built-in specs. | |
Target: i686-apple-darwin11 | |
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 |
This file contains 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
% brew install mysql51 -v | |
==> Downloading http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/mysql-5.1.58.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/mysql51-5.1.58.tar.gz | |
/usr/bin/tar xf /Library/Caches/Homebrew/mysql51-5.1.58.tar.gz | |
==> Patching | |
/usr/bin/patch -f -p1 -i 000-homebrew.diff | |
patching file scripts/mysqld_safe.sh | |
Hunk #1 succeeded at 384 (offset 1 line). | |
patching file scripts/mysql_config.sh | |
==> ./configure --without-docs --without-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/mysql51/5.1.58 --localstatedir=/usr/local/var/mysql --sysconfdir=/usr/local/etc --with-plugins=innobase,myisam --with-extra-charsets=complex --with-ssl --without-readline --enable-assembler --enable-thread-safe-client --enable-local-infile --enable-shared --with-partition |
This file contains 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
wget http://betterthangrep.com/ack-standalone | |
sudo mv ack-standalone /usr/local/bin/ack | |
sudo chmod +x /usr/local/bin/ack |
NewerOlder