Skip to content

Instantly share code, notes, and snippets.

" vim: set ft=vim ts=4 sw=4:
set nocompatible
set encoding=utf-8
scriptencoding utf-8
syntax on
"{{{ NeoBundleの設定
filetype off
filetype plugin indent off
<bean id="ebeanServerConfig" class="com.avaje.ebean.config.ServerConfig">
<property name="name" value="cpm" />
<property name="dataSource" ref="dataSource" />
<property name="ddlGenerate" value="false" />
<property name="ddlRun" value="false" />
<property name="defaultServer" value="true" />
<property name="register" value="true" />
<property name="debugSql" value="true" />
<property name="loggingDirectory" value="logs"/>
<property name="loggingLevel" value="SQL"/>
@mystelynx
mystelynx / gist:5309411
Created April 4, 2013 10:39
SimpleStepFactoryBeanはエラーハンドラの指定ができなかったので、FaultTolerantStepFactoryBeanに乗り換えた
<bean id="faultTolerantStep"
class="org.springframework.batch.core.step.item.FaultTolerantStepFactoryBean"
abstract="true">
<property name="transactionManager" ref="transactionManager" />
<property name="jobRepository" ref="jobRepository" />
<property name="startLimit" value="100" />
<property name="commitInterval" value="1" />
<property name="skipLimit" value="2" />
<!-- リトライポリシーの設定 -->
<property name="retryPolicy">
@mystelynx
mystelynx / accept-line-or-ls.zsh
Last active December 15, 2015 22:09
zshで何も入力せずにエンターしたときにlsを実行する。 http://d.hatena.ne.jp/kei_q/20110406/1302091565
accept-line-or-ls() {
zle accept-line
if [[ -z "$BUFFER" ]]; then
echo ''
ls
fi
}
zle -N accept-line-or-ls
@mystelynx
mystelynx / gist:5345109
Created April 9, 2013 11:55
対象のファイルの各行が、Regexにマッチしてればstdoutへ、してなければstderrへ出す
function validate() {
file=$1
regex=$2
cat $file | awk "
/$regex/ {
print \$0
next
}
!/$regex/ {
printf \"ERR-%05d:%s\n\", NR, \$0 > \"/dev/stderr\"
@mystelynx
mystelynx / build.gradle
Created April 26, 2013 04:45
gradleでebeanをenhanceする
configurations {
ebean
}
dependencies {
ebean group:'org.avaje', name:'ebean', version:'2.8.1'
}
task ebeanEnhancer {
doLast {
@mystelynx
mystelynx / pom.xml
Created August 14, 2013 08:10
なんか妙に苦労したのでMavenでSpockのテストを動かす設定をメモっておく。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>artifact</artifactId>
<version>1.0-SNAPSHOT</version>
@mystelynx
mystelynx / SomeClass.java
Created November 28, 2013 12:11
SpringのXMLでSQL定義1
public class SomeClass {
String aSql;
String bSql;
String cSql;
...
}
enum SQLKEY {
BARからの抽出,
FOOからの抽出,
;
}