Skip to content

Instantly share code, notes, and snippets.

View secondsun's full-sized avatar
🎩
Happy Saturday!

Hoyt Summers Pittman secondsun

🎩
Happy Saturday!
View GitHub Profile
### Keybase proof
I hereby claim:
* I am secondsun on github.
* I am secondsun (https://keybase.io/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:
@secondsun
secondsun / lambdas.java
Created May 14, 2014 15:00
Lambda's you so crazy
@Override
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:

#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

<dependency>
 org.jboss.aerogear
@secondsun
secondsun / Recipe.md
Last active August 29, 2015 14:10
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.
private Request<Void> registerDevice(JSONObject data) {
nonNull(data, "data");
return Requester.call(() -> {
data.put("deviceToken", FirebaseInstanceId.getInstance().getToken());
String authHash = getHashedAuth(unifiedPushCredentials.getVariant(),
unifiedPushCredentials.getSecret().toCharArray());
ObjectMapper om = new ObjectMapper();
//Basic construction and json serialization
var rec = new Record(42, "Hello, World!");
System.out.println(rec.toString());
System.out.println(om.writeValueAsString(rec));
//Show Constructor
var recClass = Record.class;
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository />
<interactiveMode />
<offline />
<pluginGroups />
<servers />
<mirrors />
<proxies />
<profiles>
<!doctype html>
<html>
<head>
<title>Network</title>
<script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>
<style type="text/css">
#mynetwork {
width: 1200px;
height: 800px;
FATAL EXCEPTION: main
Process: com.example.jetsnack, PID: 5430
java.lang.IllegalArgumentException: Inconsistency between the count of nodes tracked by the state (0) and the children count on the SubcomposeLayout (3). Are you trying to use the state of the disposed SubcomposeLayout?
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.makeSureStateIsConsistent(SubcomposeLayout.kt:514)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:391)
at androidx.compose.ui.layout