Skip to content

Instantly share code, notes, and snippets.

View ipereziriarte's full-sized avatar
🦄
Building Unicorns

Imanol Pérez Iriarte ipereziriarte

🦄
Building Unicorns
View GitHub Profile
@ipereziriarte
ipereziriarte / vscodeconfig.md
Created September 25, 2019 10:36
Config for vscode

#todo

@ipereziriarte
ipereziriarte / kill_gradle.sh
Created January 8, 2019 08:23
Useful gradle related scripts
#!/bin/bash
kill -9 $(ps ax | grep gradle | fgrep -v grep | awk '{ print $1 }')
04c0cab4db08e389ba3b9c6b52d516c819a73c64dbf7e137c9012d87fcd5bf18f43406041d4846dd6b694ae1ad5119a8eb8036e40f6c64ca3d7da17b4688956106
@ipereziriarte
ipereziriarte / retrofit-custom-error-handling.java
Created December 22, 2015 15:35 — forked from benvium/retrofit-custom-error-handling.java
Fairly simply Retrofit custom error handling example. Is set up so that you don't need to do much work in the 'failure' handler of a retrofit call to get the user-visible error message to show. Works on all endpoints. There's lots of exception handling as our server folks like to keep us on our toes by sending all kinds of random stuff..!
// on error the server sends JSON
/*
{ "error": { "data": { "message":"A thing went wrong" } } }
*/
// create model classes..
public class ErrorResponse {
Error error;
@ipereziriarte
ipereziriarte / TutorailPane.java
Last active September 11, 2015 15:10 — forked from fiskurgit/TutorialActivity.java
How to do code the slick 'product' tour' view pager animations with fading background colours and parallax scrolling seen in newer Google products
package eu.fiskur.pennineway.tutorial;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ipereziriarte
ipereziriarte / android_job.md
Last active September 9, 2015 10:13
Job description for our android team

##About Us We are a small, fast and disruptive company with people passionate about technology and building an awesome product that is disrupting the way people sell their used stuff. We're growing at a very fast pace and seeking creative, smart and self-motivated engineers to join us at the Android team. We're based in NYC and Barcelona.

In return, we can offer you a cool and fun environment where you can directly impact on the company success with your work. Also you'll have some great perks-benefits, advanced hardware and software tools and direct views to the Barceloneta's port.

##About You

  • You care about software; you have a passion for what you do.
  • You have an eye for software design and you understand that code is made to be read by humans.
@ipereziriarte
ipereziriarte / javadoc_parse.xml
Created September 8, 2015 10:36
How to add parse javadoc to android studio
Open /YourProjectDir/.idea/libraries/Parse_versionCode.xml"
Add the following lines:
<JAVADOC>
<root url="https://www.parse.com/docs/android/api/" />
</JAVADOC>
So it should look something like this:
<component name="libraryTable">
@ipereziriarte
ipereziriarte / fonts.xml
Created September 6, 2015 12:43
Android font family matching
From android 4.1 / 4.2, the following Roboto font families are available:
android:fontFamily="sans-serif" // roboto regular
android:fontFamily="sans-serif-light" // roboto light
android:fontFamily="sans-serif-condensed" // roboto condensed
android:fontFamily="sans-serif-thin" // roboto thin (android 4.2)
android:fontFamily="sans-serif-medium" // roboto medium (android 5.0)
in combination with this
android:textStyle="normal|bold|italic"
@ipereziriarte
ipereziriarte / string_exporter.rb
Created August 6, 2015 21:01
Export Android Strings to CSV
#!/usr/local/bin/ruby
#
# Need "nokogiri" for xml parse
#
require "nokogiri"
file = File.open(ARGV[0])
xml_doc = Nokogiri::XML(file)
array = xml_doc.xpath("//string")
@ipereziriarte
ipereziriarte / ListView
Last active August 29, 2015 14:17
Add a Ripple background to a list
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:listSelector="@drawable/my_ripple"
android:drawSelectorOnTop="true"/>
<!-- drawSelectorOnTop is actually very important: without it the ripple will be drawn under row view -->
<!-- Alternative way -->
<ListView