Skip to content

Instantly share code, notes, and snippets.

View santi-gonzalez's full-sized avatar
🏠
Working from home

Santiago Gonzàlez Bertran santi-gonzalez

🏠
Working from home
View GitHub Profile
@ignasi
ignasi / resizer-xxhdpi.sh
Last active February 7, 2021 15:29
Android XXHDPI Resizer (Tested on OS X Mavericks)
#!/bin/bash
f=$(pwd)
mkdir drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi
# fake argv and argc in bash
argc=$#; argv[0]=$0 # argv[0] is a prog name
for foo in $( seq $argc )
do
@ignasi
ignasi / db_getter.sh
Created January 30, 2014 11:43
Get database from an Android app (Android 4.3+)
#!/bin/bash
# Android 4.3+ changes app's internal directory permissions and you can not just pull your
# databases to your computer, so I did this as a workaround to extract my databases.
# I only use it for debug, use it under your responsability.
package=$1
db_name=$2
path="/data/data/$package/"
@JMPergar
JMPergar / FlipPageViewTransformer.java
Last active November 7, 2019 05:33
Flip animation for ViewPager
import android.support.v4.view.ViewPager;
import android.view.View;
public class FlipPageViewTransformer implements ViewPager.PageTransformer {
@Override
public void transformPage(View page, float position) {
float percentage = 1 - Math.abs(position);
page.setCameraDistance(12000);
setVisibility(page, position);
setTranslation(page);