Skip to content

Instantly share code, notes, and snippets.

@leandrofavarin
leandrofavarin / A.java
Created May 2, 2017 21:21 — forked from philipphager/A.java
Delighting Leandro
@AutoValue public abstract class A implements AModel {
/**
* SQLDelight Factories contain all SQL statement that were defined in the
* corresponding A.sq file in form of a SQLDelightStatement.
+ They are a sort of prepared statement,
* that contain the actual SQL string and provide type safe mappings.
* A usage of the SQLDelightStatement is demonstrated in Repository.java.
* The Factory also provides mapper, that map a row inside a cursor result
* to a Java model.
* Therefore the Factory's constructor takes a creator, that knows how to build
@leandrofavarin
leandrofavarin / PausableCountDownTimer.java
Created January 13, 2015 00:14
An Android CountDownTimer that can be paused and resumed
package com.leandrofavarin.tools;
import android.os.CountDownTimer;
public class PausableCountDownTimer {
long millisInFuture = 0;
long countDownInterval = 0;
long millisRemaining = 0;
@leandrofavarin
leandrofavarin / Do
Last active August 29, 2015 14:12
Prevent 'Android File Transfer' from opening when a device is connected
pkill -9 "Android\ File\ Transfer\ Agent"
rm -r ~/Library/Application\ Support/Google/Android\ File\ Transfer/Android\ File\ Transfer\ Agent.app
cd /Applications/Android\ File\ Transfer.app/Contents/Resources
mv Android\ File\ Transfer\ Agent.app Android\ File\ Transfer\ Agent.app.DISABLED