Skip to content

Instantly share code, notes, and snippets.

View Adam-Fresko's full-sized avatar

Adam Adam-Fresko

  • Poland
View GitHub Profile
@Adam-Fresko
Adam-Fresko / gist:9f97837bc2ee332e96441a76d21ae55b
Created February 23, 2017 14:13
RxJava with RxAndroid example
@Before
public void setUp() throws Exception {
setupRxSchedulers();
}
private void setupRxSchedulers() {
RxJavaHooks.setOnIOScheduler(current -> Schedulers.immediate());
RxAndroidPlugins.getInstance().registerSchedulersHook(new RxAndroidSchedulersHook() {
@Override
public Scheduler getMainThreadScheduler() {
public class Retro {
private static OkHttpClient httpClient;
private static Retrofit retrofit;
private static RetrofitServiceProfile mServiceProfile;
static {
httpClient = new OkHttpClient();
// link https://api.online.kreckm.pl/v4/users/93632/thumb:300x300 > chce odczytac ten error
RetrofitServiceProfile client = Retro.getServiceProfile();
// Fetch and print a list of the contributors to this library.
Call<ResponseProfile> call = client.getProfile(93632);
log(" call.execute(): " + call.execute().raw());
// This script exports photoshop layers as individual PNGs. It also
// writes a JSON file that can be imported into Spine where the images
// will be displayed in the same positions and draw order.
// Setting defaults.
var writePngs = true;
var writeTemplate = false;
var writeJson = true;
var ignoreHiddenLayers = true;
var pngScale = 1;
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;