Skip to content

Instantly share code, notes, and snippets.

Using worker: worker-linux-9-1.bb.travis-ci.org:travis-linux-10
$ git clone --depth=50 git://github.com/gocql/gocql.git gocql/gocql
Cloning into 'gocql/gocql'...
remote: Counting objects: 647, done.
remote: Compressing objects: 100% (348/348), done.
remote: Total 647 (delta 385), reused 550 (delta 298)
Receiving objects: 100% (647/647), 270.06 KiB | 0 bytes/s, done.
Resolving deltas: 100% (385/385), done.
Checking connectivity... done.
@0x6e6562
0x6e6562 / gist:b891bc8bd02bdfe28b8b
Created August 13, 2014 18:10
gocql Travis Build 371 v1
Using worker: worker-linux-11-2.bb.travis-ci.org:travis-linux-2
$ git clone --depth=50 git://github.com/gocql/gocql.git gocql/gocql
Cloning into 'gocql/gocql'...
remote: Counting objects: 652, done.
remote: Compressing objects: 100% (347/347), done.
remote: Total 652 (delta 388), reused 558 (delta 304)
Receiving objects: 100% (652/652), 271.73 KiB | 0 bytes/s, done.
Resolving deltas: 100% (388/388), done.
Checking connectivity... done.
@0x6e6562
0x6e6562 / DBWrapper.java
Created June 27, 2014 16:03
Just some glue to execute a bunch of statements in one TX using the JOOQ API
public <T> T execute(Function<DSLContext,T> fun) {
T result = null;
Connection connection = null;
DatabaseException userException = null;
try {
connection = dataSource.getConnection();
connection.setAutoCommit(false);
@0x6e6562
0x6e6562 / main.go
Created January 31, 2014 08:21
Simple gocql batch example
package main
import (
"github.com/tux21b/gocql"
"log"
)
// create table foo (
// bar bigint,
// baz ascii,
@0x6e6562
0x6e6562 / LuceneRollbackTest.scala
Created June 5, 2011 13:28
Lucene disk buffering test with small heap (-Xmx32m) using Lucene 3.2.0
package foo
import org.apache.lucene.document.Document
import org.apache.lucene.document.Field
import com.eaio.uuid.UUID
import org.apache.lucene.store.FSDirectory
import java.io.File
import org.apache.lucene.index.IndexWriter
import org.apache.lucene.analysis.WhitespaceAnalyzer