Skip to content

Instantly share code, notes, and snippets.

@xconnecting
xconnecting / hello.feature
Last active December 18, 2015 07:29
[Groovy] cucumber-jvm-groovy sample (feature)
Feature: Hello World
Scenario: Say hello
Given I have a hello app with "Howdy"
When I ask it to say hi
Then it should answer with "Howdy World"
@xconnecting
xconnecting / build.gradle
Created May 27, 2013 01:17
[Gradle] Gradle build script for executing Flyway
apply plugin: 'groovy'
apply plugin: 'eclipse'
import java.util.Properties;
import com.googlecode.flyway.commandline.Main
import com.googlecode.flyway.core.Flyway
import com.googlecode.flyway.core.util.PropertiesUtils
repositories{ mavenCentral() }
@xconnecting
xconnecting / V1_0__Create_person_table.groovy
Created May 27, 2013 01:13
[Groovy] Flyway Groovy Migration
package db.migration;
import com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration;
import java.sql.Connection;
import java.sql.PreparedStatement;
/**
* Example of a Groovy-based migration.
*/
public class V1_0__Create_person_table implements JdbcMigration {
public void migrate(Connection connection) throws Exception {
@xconnecting
xconnecting / build.gradle
Created April 2, 2013 08:10
[Gradle] Gradle Script to execute KyotoCabinet Sample
apply plugin: 'groovy'
apply plugin: 'eclipse'
repositories {
flatDir(dirs: file("lib"))
}
dependencies {
groovy localGroovy()
compile ":kyotocabinet:@jar"
@xconnecting
xconnecting / KCSample.groovy
Created April 2, 2013 08:07
[Groovy] KyotoCabinet Sample
import kyotocabinet.*;
// create the object
DB db = new DB();
// open the database
if (!db.open("casket.kch", DB.OWRITER | DB.OCREATE)){
System.err.println("open error: " + db.error());
}
@xconnecting
xconnecting / gist:5166240
Created March 14, 2013 23:36
SublimeText2 User Setting
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"font_size": 18.0,
"highlight_modified_tabs": true,
"scroll_past_end": true
}
@xconnecting
xconnecting / build.gradle
Created March 8, 2013 04:54
[Gradle]: Change sourceSets Directories
apply plugin: 'java'
apply plugin: 'eclipse'
sourceSets {
main {
java { srcDir 'src' }
resources { srcDir 'src' }
}
}
@xconnecting
xconnecting / build.gradle
Created February 20, 2013 05:02
[Gradle] Dependencies using flatDir as Repository
apply plugin: 'java'
apply plugin: 'eclipse'
repositories {
flatDir(dirs: file("lib"))
}
dependencies {
compile ":commons-lang:2.6"
}
@xconnecting
xconnecting / build.gradle
Created February 20, 2013 04:29
[Gradle] Dependencies for Local Directory
apply plugin: 'java'
apply plugin: 'eclipse'
dependencies {
compile fileTree(dir: 'lib', include: '*.jar')
}
@xconnecting
xconnecting / build.gradle
Created February 20, 2013 01:13
[Gradle] Set Classpath Variable for Eclipse
apply plugin: 'java'
apply plugin: 'eclipse'
eclipse {
pathVariables 'GRADLE_USER_HOME': gradle.gradleUserHomeDir
}
repositories {
mavenCentral()
}