Skip to content

Instantly share code, notes, and snippets.

Happy Saturday!

Hoyt Summers Pittman secondsun

Happy Saturday!
View GitHub Profile
View network.html
<!doctype html>
<script type="text/javascript" src=""></script>
<style type="text/css">
#mynetwork {
width: 1200px;
height: 800px;
View settings.xml
<settings xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<localRepository />
<interactiveMode />
<offline />
<pluginGroups />
<servers />
<mirrors />
<proxies />
ObjectMapper om = new ObjectMapper();
//Basic construction and json serialization
var rec = new Record(42, "Hello, World!");
//Show Constructor
var recClass = Record.class;
View gist:35db2bda4a05d5fa7d38c8f0234b8e68
private Request<Void> registerDevice(JSONObject data) {
nonNull(data, "data");
return -> {
data.put("deviceToken", FirebaseInstanceId.getInstance().getToken());
String authHash = getHashedAuth(unifiedPushCredentials.getVariant(),
secondsun /
Last active Aug 29, 2015
Roast Recipe

Strip Roast

  • A New York Strip Roast
  • Dry Rub (recipe follows)
  • Wet Rub (recipe follows)
  1. Preheat the Oven to 450°F
  2. If you have a baking stone, place it in the oven.
  3. Trim the fat on the roast to about 1/4 to 1/2 inch.
  4. Rub the roast with the dry rub on all sides
  5. Place the roast fat side up and make deep incisions with a knife. Stab all the way to the meat.

#AeroGear Android 1.4

Today we have pushed to Maven Central our the AeroGear's Android library version 1.4. Major features include 1) The Authorizer framework with OAuth2 support 2) enhanced Request and Response handlers for Pipe's 3) a dedicated Push messaging module 4) updated docs and sample applications and 5) full aar support for Android Studio. See the New Feature Showcase section for more details.

Fetching is as easy as always:

Fetch with Maven

secondsun /
Created May 14, 2014
Lambda's you so crazy
public Operation operate(final Object token, Environment env) {
final int value = verifyAndEvaluate(token, env);
switch (op) {
case ADD:
return ((nextToken, env2) -> (value + verifyAndEvaluate(nextToken, env2)));
case SUB:
View gist:11016751
### Keybase proof
I hereby claim:
* I am secondsun on github.
* I am secondsun ( on keybase.
* I have a public key whose fingerprint is 1B8A 6FBF AF8A 1DEF 080A 7DC4 DD47 F3B3 EC56 F304
To claim this, I am signing this object:

M1 - Basic revision Control, Data Model, Change Management, Server <->

Client Contract

  • We seem to be in agreement on a basic set of metadata to be kept for each object. [objectId, revision, object].
  • We should have a basic server definition which supports CRUD and keeps our revision numbers in check. This may not be a server product but just a spec that can be implemented by anything at this point.
  • We should have basic client code which keeps up with revisions, can check the server for new revisions, and alert the user if there is a
public class MyApplication extends Application {
public Registrar registrar;
protected void onCreate(Bundle savedInstanceState) {
Registrar r = new Registrar(PUSH_REGISTRATION_URL);
PushConfig config = new PushConfig(GCM_APP_ID);
r.register(getApplicationContext(), config, new Callback<Void>() {