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
@swankjesse
swankjesse / person.proto
Created August 23, 2013 20:46
An example protocol buffer schema.
/*
* Copyright 2013 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
@swankjesse
swankjesse / PersonProtos.java
Created August 24, 2013 05:12
Protocol Buffers from protoc 2.5.0 with "optimize_for = CODE_SIZE"
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: person.proto
package com.squareup.wire.protos.person;
public final class PersonProtos {
private PersonProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: person.proto
package com.squareup.wire.protos.person;
public final class PersonProtos {
private PersonProtos() {}
public static final class Person extends
com.google.protobuf.Message {
private int set_mask_0_;
@swankjesse
swankjesse / Person.java
Created August 24, 2013 05:36
Protocol Buffers from protobuf-javame. https://code.google.com/p/protobuf-javame/
package com.squareup.wire.protos.person;
// Generated by proto2javame, Sat Aug 24 01:33:15 EDT 2013.
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import net.jarlehansen.protobuf.javame.UninitializedMessageException;
import net.jarlehansen.protobuf.javame.input.InputReader;
import net.jarlehansen.protobuf.javame.input.DelimitedInputStream;
import net.jarlehansen.protobuf.javame.input.DelimitedSizeUtil;
@swankjesse
swankjesse / PersonProtos.java
Created August 24, 2013 05:42
Protocol Buffers from aprotoc with javamicro
// Generated by the protocol buffer compiler. DO NOT EDIT!
package com.squareup.wire.protos.person;
public final class PersonProtos {
private PersonProtos() {}
@SuppressWarnings("hiding")
public static final class Person extends
com.google.protobuf.micro.MessageMicro {
public Person() {}
@swankjesse
swankjesse / PersonProtos.java
Created August 24, 2013 21:40
Protocol Buffers from aprotoc with javanano
// Generated by the protocol buffer compiler. DO NOT EDIT!
package com.squareup.wire.protos.person;
public final class PersonProtos {
private PersonProtos() {}
@SuppressWarnings("hiding")
public static final class Person extends
com.google.protobuf.nano.MessageNano {
public static final Person EMPTY_ARRAY[] = {};
http://funxd.in/wp-content/uploads/2013/05/yptl6smf.jpg
Date: Thu, 16 Jan 2014 10:00:07 GMT
Server: Apache/2
Vary: Accept-Encoding
Last-Modified: Sat, 18 May 2013 04:30:22 GMT
Accept-Ranges: bytes
Content-Length: 68109
X-Powered-By: W3 Total Cache/0.9.1.3
Keep-Alive: timeout=1, max=100
Connection: Keep-Alive
@swankjesse
swankjesse / TwitterSample.java
Created March 11, 2014 00:08
Twitter hello world with OkHttp
package com.squareup.okhttp.sample;
import com.squareup.okhttp.ConnectionPool;
import com.squareup.okhttp.OkHttpClient;
import java.lang.reflect.Field;
import twitter4j.Paging;
import twitter4j.ResponseList;
import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
/*
* 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
/*
* 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