Skip to content

Instantly share code, notes, and snippets.


Tomáš Procházka tprochazka

View GitHub Profile
tprochazka / RemoteSignTask.groovy
Last active Jan 17, 2019
Custom sign task implementation for Android Build Plugin compatible with build plugin 3.3.0 (with app bundle support)
View RemoteSignTask.groovy
import org.gradle.api.Action
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.Project
tprochazka /
Created Feb 27, 2016
Example of solution for universal RecyclerViewAdapter
* View that can be used with this adapter must implement this interfaces.
public interface ISettableView<T> {
void setData(T item);
void setEventListener(RecylerViewAdapter.ViewItemEventListener<T> listener);
tprochazka / KnightRider.ino
Last active Jan 12, 2016
Simplistic Knight Rider (KIT) lights implementation
View KnightRider.ino
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#define PIN 6
#define LEDS 9
#define SUBSTEPS 8
#define DELAY 75
View ArduinoESP8266.ino
* Example of use ESP8266 library
* Created: 12/30/2014 7:29:04 PM
* Author: Tomáš Procházka
#include <SoftwareSerial.h>
//#include <AltSoftSerial.h>
tprochazka / build.gradle
Last active Jul 3, 2019
Smart versionName and versionCode for android Gradle build evaluation
View build.gradle
* Will return version from properties file and replace -SNAPSHOT by GIT commit hash
* to recognize origin commit for the every build.
project.ext.evalVersionName = {
def ideBuild =['android.injected.invoked.from.ide']
if (ideBuild) {"IDE build");
return "dev"
} else if (project.VERSION.toUpperCase().contains("SNAPSHOT")) {
tprochazka / ALK.ino
Created Jun 9, 2014
Code for my Arduino Learning Kit project
View ALK.ino
* Copyright (C) 2014 Tomas Prochazka
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
tprochazka / 0_reuse_code.js
Created Feb 22, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
tprochazka / thermostat.ino
Created Jan 6, 2014
Arduino thermostat example project
View thermostat.ino
#include <DHT.h>
#include <LCD5110_Basic.h>
#define DHTPIN 3 // pin teplotního senzoru
#define DHTTYPE DHT11 // typ teplotního senzoru
#define RELAYPIN 2 // pin relé
LCD5110 myGLCD(8,9,10,11,12); // piny LCD displeje
View PreferenceListFragment
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
View gist:5677714
[INFO] trouble processing "javax/xml/bind/annotation/XmlAccessorType.class":
[INFO] Ill-advised or mistaken usage of a core class (java.* or javax.*)
[INFO] when not building a core library.
[INFO] This is often due to inadvertently including a core library file
[INFO] in your application's project, when using an IDE (such as
[INFO] Eclipse). If you are sure you're not intentionally defining a
[INFO] core class, then this is the most likely explanation of what's
[INFO] going on.
You can’t perform that action at this time.