Skip to content

Instantly share code, notes, and snippets.

View swankjesse's full-sized avatar
🍩
busy busy

Jesse Wilson swankjesse

🍩
busy busy
View GitHub Profile
syntax = "proto3";
package publicobject.example;
option java_package = "com.publicobject.example";
option java_multiple_files = true;
message Person {
// The customer's full name.
optional string name = 1;
// The customer's ID number.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: publicobject/example/person.proto
package com.publicobject.example;
public interface PersonOrBuilder extends
// @@protoc_insertion_point(interface_extends:publicobject.example.Person)
com.google.protobuf.MessageOrBuilder {
/**
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: publicobject/example/person.proto
package com.publicobject.example;
public final class PersonOuterClass {
private PersonOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: publicobject/example/person.proto
package com.publicobject.example;
/**
* Protobuf type {@code publicobject.example.Person}
*/
public final class Person extends
com.google.protobuf.GeneratedMessage implements
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: publicobject/example/person.proto
package com.publicobject.example;
public interface PersonOrBuilder extends
// @@protoc_insertion_point(interface_extends:publicobject.example.Person)
com.google.protobuf.MessageOrBuilder {
/**
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: publicobject/example/person.proto
package com.publicobject.example;
public final class PersonOuterClass {
private PersonOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
package com.squareup.okhttp;
import com.squareup.okhttp.mockwebserver.Dispatcher;
import com.squareup.okhttp.mockwebserver.MockResponse;
import com.squareup.okhttp.mockwebserver.MockWebServer;
import com.squareup.okhttp.mockwebserver.RecordedRequest;
import java.io.IOException;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import junit.framework.TestCase;
public class LenovoTest extends TestCase {
public void test() throws Exception {
for (int i = 0; i < 100; i++) {
System.out.println(i);
@swankjesse
swankjesse / headers.hpack
Created October 18, 2015 15:31
Nginx Hpack bug
020347455404232f726573742f76312f73697465732f37333335303032312f706f7374732f363039313501187075626c69632d6170692e776f726470726573732e636f6d060568747470730f00057574662d380f2b0c6f6b687474702f322e352e30
@swankjesse
swankjesse / CipherSuite.java
Created November 5, 2015 05:58
Compute which cipher suites are supported by the current Java library
/*
* Copyright (C) 2014 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software