Skip to content

Instantly share code, notes, and snippets.

View hgoebl's full-sized avatar

Heinrich Goebl hgoebl

View GitHub Profile
@hgoebl
hgoebl / proposal.md
Last active August 5, 2019 19:05
Is this a good idea for a mobile app to teach people sustainability?

Thoughts / Background

  • There are only few people who care about climate change, sustainability, degrowth and the like.
  • Many facts about negative and positive behavior regarding "saving our planet" are unknown.
  • Most prefer easy reading and don't want to dig deep into knowledge about how the planet is being destroyed by ourselves.
  • Long articles with all the background facts and myths are not read by many.
  • When talking about "avoid flights, meat, plastic, big cars, ..." many people feel offended and go elsewhere.

The Idea

@hgoebl
hgoebl / TestWebb_LocalStackoverflow27980798.java
Created January 16, 2015 11:39
Example using DavidWebb HTTP-Client for a stackoverflow question
package com.goebl.david;
public class TestWebb_LocalStackoverflow27980798 extends AbstractTestWebb {
public static final String BASE_URL = "https://domain.com";
public static final String API_VER = "/v1";
public void testDownload() throws Exception {
String token = "token12345";
@hgoebl
hgoebl / AngularJS-Guide-Print-CSS.md
Last active August 29, 2015 14:09
AngularJS Guide CSS for print

Obviously printing out the interactive AngularJS Guide is not a really good idea, I admit. But for whatever reason I like to study the guide with my text-marker while sitting in the garden.

I only added the following CSS to the file <angular.js-root>/docs/app/assets/css/docs.css.

After building (grunt, gulp) the files get served by node-static (because I always use this as ad-hoc web-server, even if grunt delivers the page through grunt server).

package com.goebl.david;
import junit.framework.TestCase;
import org.json.JSONObject;
public class TestWebb_LocalStackoverflow23678518 extends TestCase {
public void testPost() throws Exception {
JSONObject register = new JSONObject();
package com.goebl.david;
import junit.framework.TestCase;
public class TestSO23260208 extends TestCase {
public void testGet() throws Exception {
Webb webb = Webb.create();
Response<String> response = webb
@hgoebl
hgoebl / keybase.md
Created March 24, 2014 20:11
keybase.md

Keybase proof

I hereby claim:

  • I am hgoebl on github.
  • I am hgoebl (https://keybase.io/hgoebl) on keybase.
  • I have a public key whose fingerprint is 2775 3D55 76C5 FD7D A8D6 54A4 11CA 0DB2 5BD1 880D

To claim this, I am signing this object:

@hgoebl
hgoebl / TestSO20987525.java
Last active January 2, 2016 13:58
Example using DavidWebb for Stackoverflow Question 20987525 http://stackoverflow.com/questions/20987525/
import com.goebl.david.Webb;
import org.json.JSONObject;
import org.junit.Test;
public class TestSO20987525 {
static final String SOAP_ACTION = "http://888topup.com/ImageProcess.svc/UploadImage";
@Test
public void dotNetCall() throws Exception {
@hgoebl
hgoebl / gist:8261396
Created January 4, 2014 22:08
IntelliJ module definition for Android Library project for android-support-v7-appcompat
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="LIBRARY_PROJECT" value="true" />
<option name="UPDATE_PROPERTY_FILES" value="true" />
</configuration>
</facet>
</component>
@hgoebl
hgoebl / gist:7984391
Created December 16, 2013 09:25
Example using DavidWebb with Google-API
package com.goebl.david;
import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Real world testing a Google API.
*
@hgoebl
hgoebl / proxy-settings.json
Created November 28, 2013 16:43
not working configuration with node-http-proxy
{
"silent": false,
"pathnameOnly": true,
"router": {
"/tomcat": "127.0.0.1:8080",
"/static": "127.0.0.1:8888"
}
}