Skip to content

Instantly share code, notes, and snippets.

@pbednarz
pbednarz / SignatureCheck.java
Created March 16, 2016 19:39 — forked from scottyab/SignatureCheck.java
Simple Android signature check. It's not bullet proof but does increase the difficulty of backdooring the app
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
public class TamperCheck {
//we store the hash of the signture for a little more protection
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846";
@pbednarz
pbednarz / default.xml
Created October 6, 2015 19:54 — forked from alexras/default.xml
This file configures MAME to use four controllers (I use XBox 360 wireless controllers) as inputs
<?xml version="1.0"?>
<!-- This file configures MAME to use four controllers (I use XBox 360 wireless controllers) as inputs -->
<mameconfig version="10">
<system name="default">
<input>
<port type="P1_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_1_YAXIS_UP_SWITCH
</newseq>
</port>
public class BatteryActivity extends Activity {
//UI Elements
private TextView mTextViewLevel;
private TextView mTextViewTemperature;
private TextView mTextViewVoltage;
private TextView mTextViewHealth;
//Battery details
private int level;
package your.package;
import android.app.Activity;
import android.os.Bundle;
import android.support.v7.graphics.Palette;
import com.squareup.picasso.Picasso;
import your.package.PaletteTransformation;
import static your.package.PaletteTransformation.PaletteCallback;