Skip to content

Instantly share code, notes, and snippets.

View MaTriXy's full-sized avatar

Yossi Elkrief MaTriXy

View GitHub Profile
@MaTriXy
MaTriXy / RootedDeviceCheck.java
Created November 9, 2015 19:40
RootedDeviceCheck works from Android 4.0 till 6.0
import java.io.File;
/**
* Created by user on 02/08/2015.
*/
public class RootedDeviceCheck {
/**
* Checks if the device is rooted.
*
@MaTriXy
MaTriXy / LogUtil.java
Created November 18, 2015 13:00 — forked from dors/LogUtil.java
Cool log util for Android apps that prints each log with the thread, class name and method name from which the log was made
import android.util.Log;
import java.text.MessageFormat;
/*
* Copyright 2015 Dor Sakal
*
* 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
@MaTriXy
MaTriXy / tinder-api-documentation.md
Created November 19, 2015 21:23 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

Note: this was written in April/May 2014 and the API may have changed since

API Details

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"
android:color="@color/flat_disabled_text"/>
<item android:color="@color/flat_normal_text"/>
</selector>
@MaTriXy
MaTriXy / DashboardLayout.java
Created December 16, 2015 12:10 — forked from romannurik/DashboardLayout.java
A custom Android layout class that arranges children in a grid-like manner, optimizing for even horizontal and vertical whitespace.
/*
* ATTENTION:
*
* This layout is now maintained in the `iosched' code.google.com project:
*
* http://code.google.com/p/iosched/source/browse/android/src/com/google/android/apps/iosched/ui/widget/DashboardLayout.java
*
*/
/*
/*
* Copyright 2011 Google Inc.
*
* 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
@MaTriXy
MaTriXy / svg-to-android.sh
Created December 17, 2015 12:58 — forked from deepankarb/svg-to-android.sh
A script to generate android assets from a SVG file. Requires inkscape to resize and convert.
#!/bin/bash
if [[ -z "$1" ]];
then
echo "No SVG file specified. Exiting."
exit -1
fi
ispng=$(file $1)
echo $ispng | grep -q SVG
@MaTriXy
MaTriXy / strip_play_services.gradle
Created December 21, 2015 05:18 — forked from dmarcato/strip_play_services.gradle
Gradle task to strip unused packages on Google Play Services library
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
@MaTriXy
MaTriXy / CreditCardEditText.java
Created December 23, 2015 13:06 — forked from alphamu/CreditCardEditText.java
A simple EditText view for use with Credit Cards. It shows an image of the credit card on the right hand side.
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.AppCompatEditText;
import android.util.AttributeSet;
import android.util.SparseArray;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@MaTriXy
MaTriXy / build.gradle
Created December 31, 2015 20:22 — forked from gabrielemariotti/build.gradle
Use signing.properties file which controls which keystore to use to sign the APK with gradle.
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}