Skip to content

Instantly share code, notes, and snippets.

View rjmangubat23's full-sized avatar

Reuben Mangubat rjmangubat23

View GitHub Profile
package com.myarvo.creditandroid.features.payables
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import com.myarvo.creditandroid.R
import com.myarvo.creditandroid.core.platform.BaseActivity
import com.myarvo.creditandroid.features.loans.LoanAffiliate
@rjmangubat23
rjmangubat23 / GetMovie.kt
Created November 5, 2021 06:00
GetLoan.kt
class GetMovie
@Inject constructor(private val repository: Repository) : UseCase<Loan, GetMovie.Params>() {
override suspend fun run(params: Params) = repository.getMovieById(params.id)
data class Params(val id: String)
}
@rjmangubat23
rjmangubat23 / TopUpViewModelTest.kt
Created October 21, 2021 07:31
TopUpViewModelTest.kt
package com.blaggo.android
import android.os.Build
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.blaggo.android.common.api.BlaggoService
import com.blaggo.android.component.HomeVM
import com.blaggo.android.component.TopupVM
import com.blaggo.android.component.user.UserPrefStore
import com.blaggo.android.model.ProfileListResponse
@rjmangubat23
rjmangubat23 / French_ID.java
Created October 5, 2021 05:34
French_ID.java
/*
* Java parser for the MRZ records, as specified by the ICAO organization.
* Copyright (C) 2011 Innovatrics s.r.o.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
@rjmangubat23
rjmangubat23 / MrzFormat.java
Created September 29, 2021 04:16
MrzFormat.java
/*
* Java parser for the MRZ records, as specified by the ICAO organization.
* Copyright (C) 2011 Innovatrics s.r.o.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
@rjmangubat23
rjmangubat23 / Dominican_Republic_ID.java
Last active September 29, 2021 03:28
Dominican_Republic_ID.java
/*
* Java parser for the MRZ records, as specified by the ICAO organization.
* Copyright (C) 2011 Innovatrics s.r.o.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
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";