Skip to content

Instantly share code, notes, and snippets.

View letroll's full-sized avatar

Julien Quiévreux letroll

View GitHub Profile
@letroll
letroll / android.xml
Created May 9, 2013 16:33
android template for intellij
<?xml version="1.0" encoding="UTF-8"?>
<templateSet group="android">
<template name="lh" value="android:layout_height=&quot;$END$&quot;" description="layout_height" toReformat="false" toShortenFQNames="true">
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="XSL_TEXT" value="true" />
<option name="XML" value="true" />
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="false" />
@letroll
letroll / EmailAutoCompleteTextView.java
Last active July 6, 2017 11:42
[EmailAutoCompleteTextView] EmailAutoCompleteTextView #android #customView #email
package com.example.customView;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
@letroll
letroll / .gitignore
Last active August 29, 2015 14:21
Create a global .gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
#! /bin/bash
#=====================================================================
# Selects an android device
# Copyright (C) 2012-2013 Diego Torres Milano. All rights reserved.
#
# See:
# - http://dtmilano.blogspot.ca/2013/01/android-select-device.html
# - http://dtmilano.blogspot.ca/2012/03/selecting-adb-device.html
# for details on usage.
#=====================================================================
@letroll
letroll / increase.sh
Last active July 6, 2017 11:38
[temporarily resize tmp] temporarily resize tmp #tmp #unix #linux #partition #bash #shell
# mount -o remount,size=8G,noatime /tmp
@letroll
letroll / gist:b06704340947b8d140dd
Last active July 6, 2017 11:37
[gradle android signinConfigs] gradle android signinConfigs #gradle #android #signature
signingConfigs {
release
}
defaultConfig {
signingConfig signingConfigs.release
}
def Properties props = new Properties()
def homePath = System.properties['user.home']
@letroll
letroll / gist:a12b7067ed042be8f98c
Last active July 5, 2017 15:40 — forked from DomGries/gist:3786466
[event bus csharp] event bus csharp #eventbus
using System;
using System.Collections.Generic;
public class GameEvent
{
}
public class EventMessenger
{
@letroll
letroll / CurlLoggingInterceptor.java
Last active July 5, 2017 15:39 — forked from jgilfelt/CurlLoggingInterceptor.java
[OkHttp interceptor logs requests as curl commands] An OkHttp interceptor that logs requests as curl shell commands #android #okhttp #curl #unix #request
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@letroll
letroll / paginate.java
Last active July 5, 2017 15:27
[pagination avec rxjava] pagination avec rxjava #android #rxjava #rx
private void downloadDataWhenDiscussionUnresolved(String numPage) {
Observable<Discussions> operationObservable = getDiscussionsObservable(numPage);
operationObservable.subscribe(new Subscriber<Discussions>() {
@Override
public void onCompleted() {
Log.d(TAG, "onCompleted() called");
}
@Override
@letroll
letroll / gist:54ecddfc7752c90afc148235f87d90e7
Last active July 5, 2017 15:30
[get android project dependencies] lister les dépendances gradle de l'application #android #gradle
https://blog.mindorks.com/avoiding-conflicts-in-android-gradle-dependencies-28e4200ca235
gradle -q dependencies your-app-project:dependencies
gradlew :app:dependencies
gradlew :app:dependencie
gradlew :app:androidDependencies
configurations.all {
resolutionStrategy {