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 | |
| gfile="`pwd`/g.cvs" | |
| pfile="`pwd`/p.cvs" | |
| reqnum=$1 | |
| concurr=$2 | |
| url=$3 | |
| ab -n $reqnum -c $concurr -k -r -g $gfile -e $pfile $url > report.txt |
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
| set terminal png | |
| set output "ctime.png" | |
| set xlabel "request" | |
| set ylabel "ms" | |
| plot "g.cvs" using 7 with lines title "ctime" | |
| set terminal png | |
| set output "dtime.png" | |
| set xlabel "request" | |
| set ylabel "ms" |
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
| #工作进程 组和用户 | |
| user www www; | |
| #工作进程数,设置为cpu核数 | |
| worker_processes 4; | |
| #CPU亲缘性,绑定每个work进程到固定的CPU核 | |
| worker_cpu_affinity 0001 0010 0100 1000; | |
| #错误日志目录 |
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 | |
| # Installer for GitLab on RHEL 5 (Red Hat Enterprise Linux and CentOS) | |
| # mattias.ohlsson@inprose.com | |
| # | |
| # Only run this on a clean machine. I take no responsibility for anything. | |
| # | |
| # Submit issues here: github.com/mattias-ohlsson/gitlab-installer | |
| # Exit on error | |
| #set -e |
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
| module.exports = function(config){ | |
| config.set({ | |
| basePath : '../../', | |
| files : [ | |
| 'public/app/lib/angular/angular.js', | |
| 'public/app/lib/angular-mocks/angular-mocks.js', | |
| 'public/app/js/**/*.js', | |
| 'test/page/unit/**/*.js' |
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
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| clean: { | |
| build: ['build'] | |
| }, | |
| uglify: { |
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 | |
| boxid=$1 | |
| datadir="/data/$boxid" | |
| cntid=`docker ps -a|grep $boxid|awk '{print $1}'` | |
| cntip=`docker inspect --format='{{.NetworkSettings.IPAddress}}' $cntid` |
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 | |
| warfile=$1 | |
| #dockerman path | |
| dmdir=`pwd` | |
| hostip='10.0.22.151' |
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 | |
| cntip=$1 | |
| cntport=$2 | |
| prerulenum=`sudo iptables -t nat --list PREROUTING --line-number|grep "${cntip}:${cntport}"|awk '{print $1}'` | |
| sudo iptables -t nat -D PREROUTING $prerulenum |
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 | |
| pro='tcp' | |
| cntip=$1 | |
| cntport=$2 | |
| hostip=$3 | |
| hostport=$4 | |
| sudo iptables -t nat -A PREROUTING -m $pro -p $pro --dport $hostport -j DNAT --to-destination $cntip:$cntport | |
| sudo iptables -t nat -A POSTROUTING -m $pro -p $pro --dport $cntport -d $cntip -j SNAT --to-source $hostip |