MacOSX + Vagrant + CoreOS + Docker + Ubuntuの環境。
2014年6月11日時点での情報。
- Version: CoreOS 343.0.0
- Kernel: 3.14.5
- Docker: 1.0
| File.open('a2.xml','r').read.force_encoding('BIG5').encode('UTF-8', invalid: :replace, undef: :replace, replace: "") |
| .pagination > a, .pagination > span { | |
| background-color: #fff; | |
| border: 1px solid #ddd; | |
| color: #428bca; | |
| float: left; | |
| line-height: 1.42857; | |
| margin-left: -1px; | |
| padding: 6px 12px; | |
| position: relative; | |
| text-decoration: none; |
| def domain = model(com.foo.Bar) | |
| domain.className == "FooBar" | |
| domain.fullName == "com.foo.FooBar" | |
| domain.packageName == "com.foo" | |
| domain.packagePath == "com/foo" | |
| domain.propertyName == "fooBar" | |
| domain.lowerCaseName == "foo-bar" |
| 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 |
| <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" |
| 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 |
| // 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.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") |
| #!/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/" |