Skip to content

Instantly share code, notes, and snippets.

View tolbertam's full-sized avatar
✔️

Andrew Tolbert tolbertam

✔️
View GitHub Profile
diff --git a/pom.xml b/pom.xml
index f508c6f..957c3b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,6 +87,8 @@
<test.groups>unit</test.groups>
<test.osgi.skip>true</test.osgi.skip>
<javadoc.opts />
+ <!-- enforces code formatting, use format -Pformat to have maven build format code instead -->
+ <fmtGoal>check</fmtGoal>

Keybase proof

I hereby claim:

  • I am tolbertam on github.
  • I am tolbertam (https://keybase.io/tolbertam) on keybase.
  • I have a public key ASCQ61z629AqnCe2JBJr4JU5QrsCa3JuH5zAJI4FFwdd1wo

To claim this, I am signing this object:

package am.tolbert.gremlin
import com.datastax.driver.dse.DseCluster
import com.datastax.driver.dse.graph.GraphOptions
import com.datastax.dse.graph.api.DseGraph
import gremlin.scala._
object GremlinScalaApp extends App {
set shell=bash " Set bash as shell
set nocompatible " Enable plugins
set hlsearch " Enable search highlighting
set incsearch " Enable incremental search
set ruler " Show the cursor position all the time
"set colorcolumn=80 " Show 80 character margin
set cursorline " Highlight the current line
set visualbell t_vb= " Turn off error beep.
" set number " Enable line numbers
set ignorecase " Ignore case while search
import com.codahale.metrics.ConsoleReporter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import com.datastax.driver.core.*;
import com.google.common.util.concurrent.Uninterruptibles;
import io.netty.channel.EventLoopGroup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Optional;
diff --git a/driver-core/src/main/java/com/datastax/driver/core/Requests.java b/driver-core/src/main/java/com/datastax/driver/core/Requests.java
index 7ebc01b..ecf9653 100644
--- a/driver-core/src/main/java/com/datastax/driver/core/Requests.java
+++ b/driver-core/src/main/java/com/datastax/driver/core/Requests.java
@@ -238,12 +238,26 @@ class Requests {
return set;
}
- static int serialize(EnumSet<QueryFlag> flags) {
+ private static int serialize(EnumSet<QueryFlag> flags) {
atolbert-rmbp:leap-java-demo atolbert$ docker run --rm --privileged tolbertam/leap-java-demo:6-jdk
Setting clock and injecting leap second 10 seconds from now.
Setting time to speed up testing
Running for 1 iterations. Press ctrl-c to stop
Setting time to Sun Jan 1 23:59:50 2017
Scheduling leap second for Mon Jan 2 00:00:00 2017
Setting timer for 1483315200 - Mon Jan 2 00:00:00 2017
(+0 ms) System.currentTimeMillis(): 1483315190101, new Date(): 2017-01-01 23:59:50,101
(+204 ms) System.currentTimeMillis(): 1483315190312, new Date(): 2017-01-01 23:59:50,312
@tolbertam
tolbertam / .bash_profile
Created October 6, 2016 13:51
Add to existing .bash_profile
export MVN_VERSION=3.3.9
export ANT_VERSION=1.9.7
export JDK_VERSION=8
alias mvn='docker run -it --rm -v "$PWD":/usr/src/mymaven -v "$HOME/.m2":/root/.m2 -w /usr/src/mymaven maven:"$MVN_VERSION"-jdk-"$JDK_VERSION"-alpine mvn'
alias ant='docker run -it --rm -v "$PWD":/usr/src/myant -v "$HOME/.m2":/root/.m2 -w /usr/src/myant frekele/ant:"$ANT_VERSION"-jdk"$JDK_VERSION" ant'
@tolbertam
tolbertam / console-reporter.js
Last active February 27, 2016 22:12
Custom Reporters
'use strict';
var ScheduledReporter = require('./reporter.js').ScheduledReporter;
var util = require('util');
var sprintf = require('sprintf').sprintf;
function ConsoleReporter(registry) {
ConsoleReporter.super_.call(this, registry);
}
util.inherits(ConsoleReporter, ScheduledReporter);
@tolbertam
tolbertam / MapExample.java
Last active August 29, 2015 14:28
MapExample.java
package com.datastax.driver.core;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.reflect.TypeToken;
import static com.google.common.collect.Lists.newArrayList;