Skip to content

Instantly share code, notes, and snippets.

View EsteveAguilera's full-sized avatar
🏃‍♂️
Programming or running

Esteve Aguilera EsteveAguilera

🏃‍♂️
Programming or running
View GitHub Profile

Keybase proof

I hereby claim:

  • I am esteveaguilera on github.
  • I am esteve (https://keybase.io/esteve) on keybase.
  • I have a public key ASC7SGtk63OOWGCnhXXcB2_jYNI5xYlMsJZCoK34A7sHwwo

To claim this, I am signing this object:

@EsteveAguilera
EsteveAguilera / me.gif
Last active July 1, 2019 06:10
Life is better with gifs
me.gif
@EsteveAguilera
EsteveAguilera / linux-command-line-install-android-sdk
Created November 11, 2017 22:53
Install Android SDK on a Debian server, e.g for a server running Jenkins
# Download the android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
# Uncompress the donwloaded file
tar -xvf android-sdk_r24.2-linux.tgz
# Enter the uncompressed folder
cd android-sdk-linux/tools
# Install all sdk packages
@EsteveAguilera
EsteveAguilera / auto-redirect.php
Created December 31, 2015 10:09
PHP code to redirect the user depending on if it's running on android or ios
<?php
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
$iOS = stripos( $_SERVER['HTTP_USER_AGENT'], "iOS" );
$iPod = stripos( $_SERVER['HTTP_USER_AGENT'], "iPod" );
$iPhone = stripos( $_SERVER['HTTP_USER_AGENT'], "iPhone" );
$iPad = stripos( $_SERVER['HTTP_USER_AGENT'], "iPad" );
$Android = stripos( $_SERVER['HTTP_USER_AGENT'], "Android" );
}
if ( $iOS || $iPod || $iPhone || $iPad ) {
header( 'Location: http://ios_web' );
@EsteveAguilera
EsteveAguilera / IgnoreAccentsArrayAdapter.java
Last active May 28, 2018 18:31
ArrayAdapter to use with Android AutoCompleteTextView or MultiAutoCompleteTextView that will ignore the accents for the completion suggestions. Based on the code from http://stackoverflow.com/questions/4869392/diacritics-international-characters-in-autocompletetextview
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.TextView;