Skip to content

Instantly share code, notes, and snippets.

View zeero0's full-sized avatar

Fazal zeero0

View GitHub Profile
@zeero0
zeero0 / MainActivity.java
Last active February 25, 2021 04:35
Check and Request multiple permissions easily on Android 6.0 (API level 23) and above
package com.zeeroapps.easy_permissions;
import android.Manifest;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
@scottopell
scottopell / fix_exfat_drive.md
Last active September 18, 2024 23:41
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
//
// InAppManager.swift
//
// Created by Ellina Kuznetcova on 12/10/2016.
// Copyright © 2016 Flatstack. All rights reserved.
//
import Foundation
import StoreKit
@jayrambhia
jayrambhia / CardPagerTransformerBasic.java
Last active December 21, 2019 05:55
ViewPager Cards
public class CardsPagerTransformerBasic implements ViewPager.PageTransformer {
private int baseElevation;
private int raisingElevation;
private float smallerScale;
public CardsPagerTransformerBasic(int baseElevation, int raisingElevation, float smallerScale) {
this.baseElevation = baseElevation;
this.raisingElevation = raisingElevation;
this.smallerScale = smallerScale;
@alexfu
alexfu / EqualSpacingItemDecoration.java
Last active September 17, 2024 09:36
Add equal spacing to RecyclerView items automatically. Can handle horizontal, vertical, and grid display modes
import android.graphics.Rect;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
public class EqualSpacingItemDecoration extends RecyclerView.ItemDecoration {
private final int spacing;
private int displayMode;
public static final int HORIZONTAL = 0;
@wbroek
wbroek / genymotionwithplay.txt
Last active August 12, 2024 07:34
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)