Skip to content

Instantly share code, notes, and snippets.

Rachel Tannenbaum rtannenbaum

  • Google
  • Chicago
Block or report user

Report or block rtannenbaum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e9a2756e7a2a3b8f575ae7e484d46527
jar -tf /usr/local/google/home/rtannenbaum/github/data-transfer-project/distributions/demo-server/build/libs/demo-server-all.jar | grep .properties
org/apache/http/client/version.properties
org/bouncycastle/x509/CertPathReviewerMessages.properties
org/bouncycastle/x509/CertPathReviewerMessages_de.properties
org/apache/http/version.properties
org/apache/log4j/lf5/config/defaultconfig.properties
log4j.properties
org/apache/axis/i18n/resource.properties
org/apache/axis/i18n/resource_ja.properties
org/apache/axis/utils/tcpmon.properties
View gist:e8d31500567ac2d1cfaf3b5c36e0425a
@Provides
@Singleton
ApiSettings getApiSettings() {
// TODO: currently, any setting in both a base and env config will be overridden by the last
// definition. e.g. a setting in api.yaml and env/api.yaml will take the definition in
// env/api.yaml. Determine whether this is intended behavior.
try {
ImmutableList<String> settingsFiles = ImmutableList.<String>builder()
.add(API_SETTINGS_PATH)
.add(ENV_API_SETTINGS_PATH)
@rtannenbaum
rtannenbaum / AutoValue_Item.java
Created Apr 2, 2014
AutoValue generated source code
View AutoValue_Item.java
@javax.annotation.Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_Item extends Item {
private final String sku;
private final String barcode;
private final boolean backup;
private final boolean removed;
private final int external_srr_reservation_id;
private final int external_rb_reservation_id;
AutoValue_Item(
@rtannenbaum
rtannenbaum / pom.xml
Created Apr 1, 2014
Maven compiler plugin
View pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
@rtannenbaum
rtannenbaum / pom.xml
Created Apr 1, 2014
Maven annotation processor plugin
View pom.xml
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.5</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
@rtannenbaum
rtannenbaum / pom.xml
Last active Aug 29, 2015
Maven auto-value dependency
View pom.xml
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
</dependency>
@rtannenbaum
rtannenbaum / ItemTest.java
Last active Aug 29, 2015
Serialization unit tests
View ItemTest.java
public class ItemTest {
private static ObjectMapper MAPPER = new ObjectMapperFactory().build();
private Item item = Item.create("AB123_S", "038678561125", false, true, 0, 1);
@Test
public void testJsonSerialization() throws IOException {
String json = MAPPER.writeValueAsString(item);
assertEquals(jsonFixture("fixtures/Item.json"), json);
}
View Item.json
{
"sku":"AB123_S",
"barcode":"038678561125",
"backup":false,
"removed":true,
"external_srr_reservation_id":0,
"external_rb_reservation_id":1
}
@rtannenbaum
rtannenbaum / Item.java
Created Apr 1, 2014
Jackson serialization
View Item.java
@AutoValue
public abstract class Item
{
@JsonCreator
public static Item create(
@JsonProperty("sku") String sku,
@JsonProperty("barcode") String barcode,
@JsonProperty("backup") boolean backup,
@JsonProperty("removed") boolean removed,
View Item.java
@AutoValue
public abstract class Item
{
public static Item create(String sku, String barcode, boolean backup, boolean removed,
int external_srr, int external_rb) {
return new AutoValue_Item(sku, barcode, backup, removed, external_srr, external_rb);
}
public abstract String sku();
You can’t perform that action at this time.