Skip to content

Instantly share code, notes, and snippets.


Juanma tutorial for using Fresco as "Picasso"

La diferencia mas grande entre picasso y fresco es que (por si te preguntan):

Android <4.0 usa como vm Dalvik. De 4.0 a 4.4 esta Dalvik y ART (Beta). >5.0 ART.

Las mayor diferencia entre Dalvik y ART, es que dalvik tiene un solo heap uniforme y que, cada vez que corra el garbage collector, haltea TODOS los procesos para limpiar la memoria. Entonces en los celulares de dalvik, si empezas a usar mucha memoria y tiene que recolectarla, se te "freezea" el celular por unos ms.

Esto se nota demasiado en las listviews/gridviews/recyclerviews, ya que uno levanta muchisima memoria y se recolecta al toque, pero en dalvik esto haltea ;).

saantiaguilera / commit
Created Oct 1, 2016
Commit with gpg without having to always remember -S
View commit
EXISTS="`git config --global --list | sed -n "/.*signingkey.*/p"`"
if [ -z $EXISTS ]
echo "Woops ! It seems you dont have your git signed. Looking for an existing GPG key..."
SIGNING_KEY="`gpg --list-keys | sed -n '3p' | sed "s/.*\///" | sed "s/ .*//"`"
saantiaguilera / .adb-aliases
Created Oct 20, 2016
Easy adb aliases for an easier life
View .adb-aliases
func_adbfilter() {
adb logcat | ggrep `adb shell ps | ggrep $1 | cut -c10-15`
alias adbfilter=func_adbfilter
func_adbphonedata() {
adb shell cat /proc/cpuinfo
saantiaguilera /
Last active Feb 15, 2018 — forked from ktnr74/
** parses Android services source code to find out transaction codes and saves them in YAML format for later use. *transaction_codes.yaml* is an example of the resulting file. ** shows how it can be used
import os
import sys
import time
import yaml
import subprocess
import re
import struct
View webp-converter.gradle
// Root header to have dependencies
buildscript {
repositories {
dependencies {
classpath "$gradleBuildToolsVersion"
classpath gradleApi()
saantiaguilera / .zshrc
Created Oct 31, 2019
Volume manager for abstracting code sources
View .zshrc
# Add this in your .zshrc or .bash_profile or wherever you want
mount() {
# Note that I save all my sparse images in ~/Projects/
hdiutil attach ~/Projects/$1.dmg.sparseimage -mountpoint /Volumes/$1
unmount() {
hdiutil detach /Volumes/$1
View IntegrationTests.kt
package com.mercadolibre.dojo
import org.junit.Assert
import org.junit.Before
import org.junit.Test
class IntegrationTests {
lateinit var player1: Player
lateinit var player2: Player
View gist:0cff19305fd9186978b4a396326af530
"link": "",
"leaderboard": "1. X - 100 puntos\n2. Y - 25 puntos\n3. Z - 5 puntos"
"link": "",
"leaderboard": "1. X - 100 puntos\n2. Y - 25 puntos\n3. Z - 5 puntos"
saantiaguilera / Result.kt
Created Jan 14, 2021
Result sealed class for kotlin error handling, allowing us to write safe code either in a functional or imperative format, without the use of exceptions. Since kotlin from 1.3 onwards changed their Result into an inline class, we can no longer use it for return values (which eliminates the bad smell of exceptions as errors, like most modern lang…
View Result.kt
package com.saantiaguilera
import com.saantiaguilera.Result.Failure
import com.saantiaguilera.Result.Success
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.InvocationKind
import kotlin.contracts.contract
* A discriminated union that encapsulates successful outcome with a value of type [S]