Skip to content

Instantly share code, notes, and snippets.

View dhesson's full-sized avatar
🏠
Working from home

Dave Hesson dhesson

🏠
Working from home
View GitHub Profile
@dhesson
dhesson / somegist.py
Created November 11, 2015 16:32
Code fragment for a MongoEngine query result item to serializable JSON dictionary.
data = o.to_mongo()
o_id = data.pop('_id', None)
if o_id:
data['id'] = str(o_id)
data.pop('_cls', None)
return data
package dev;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import com.google.api.client.auth.oauth2.BearerToken;
import com.google.api.client.auth.oauth2.ClientParametersAuthentication;
import com.google.api.client.auth.oauth2.Credential;
@dhesson
dhesson / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-calculator/paper-calculator.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')