MacOSX + Vagrant + CoreOS + Docker + Ubuntuの環境。
2014年6月11日時点での情報。
- Version: CoreOS 343.0.0
- Kernel: 3.14.5
- Docker: 1.0
| #!/bin/bash | |
| # description: Tomcat Start Stop Restart | |
| # processname: tomcat | |
| # chkconfig: 234 20 80 | |
| JAVA_HOME=/srv/java | |
| export JAVA_HOME | |
| PATH=$JAVA_HOME/bin:$PATH | |
| export PATH | |
| CATALINA_HOME=/srv/tomcat |
| #!/bin/bash | |
| echo -e "\nbenchmark.sh -n<number of requests> -c<number of concurrency> <URL1> <URL2> ..." | |
| echo -e "\nEx: benchmark.sh -n100 -c10 http://www.google.com/ http://www.bing.com/ \n" | |
| ## Gnuplot settings | |
| echo "set terminal png | |
| set output 'benchmark_${1}_${2}.png' | |
| set title 'ab ${1} ${2}' |
| set nocompatible | |
| filetype off | |
| filetype plugin indent off | |
| set runtimepath+=$GOROOT/misc/vim | |
| set encoding=utf-8 | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| set tabstop=4 | |
| set shiftwidth=4 |
| #!/bin/bash | |
| date=`date +%Y-%m-%d` | |
| RETENTION_PERIOD="7" | |
| HEADER="Backup data" | |
| remove_oldfiles(){ | |
| echo "Removing directory $1 files older than $RETENTION_PERIOD days" | wall | |
| find $1 -type f -mtime +$2 -exec rm '{}' \; | |
| } | |
| BACKUPDIR="/disk0/svn_backup/001/" |
| import com.zaxxer.hikari.HikariConfig | |
| import com.zaxxer.hikari.HikariDataSource | |
| // Place your Spring DSL code here | |
| beans = { | |
| def config = application.config | |
| println config | |
| def dataSources = config.findAll { | |
| pritnln it.key.toString() | |
| it.key.toString().contains("dataSource") |
| // Place your Spring DSL code here | |
| beans = { | |
| dataSource(com.alibaba.druid.pool.DruidDataSource) { | |
| url = "${grailsApplication.config.dataSource.url}" | |
| username = "${grailsApplication.config.dataSource.username}" | |
| password = "${grailsApplication.config.dataSource.password}" | |
| maxActive = "${grailsApplication.config.dataSource.maxActive ? grailsApplication.config.dataSource.maxActive : "2"}" | |
| filters = "stat" | |
| validationQuery = "select 1" |
| import com.alibaba.druid.support.http.StatViewServlet | |
| import grails.boot.GrailsApp | |
| import grails.boot.config.GrailsAutoConfiguration | |
| import org.springframework.boot.context.embedded.ServletRegistrationBean | |
| import org.springframework.context.annotation.Bean | |
| class Application extends GrailsAutoConfiguration { | |
| @Bean |
| <Resource name="jdbc/druid-test" | |
| auth="Container" | |
| type="javax.sql.DataSource" | |
| username="sa" | |
| password="password" | |
| driverClassName="net.sourceforge.jtds.jdbc.Driver" | |
| factory="com.alibaba.druid.pool.DruidDataSourceFactory" | |
| maxActive="3" | |
| maxIdle="3" | |
| maxWait="10000" |
| applaction.yml | |
| dataSource: | |
| url: jdbc:mysql://127.0.0.1:3306/databases?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull | |
| my.cnf | |
| [client] | |
| default-character-set = utf8mb4 | |
| [mysql] | |
| default-character-set = utf8mb4 |