Skip to content

Instantly share code, notes, and snippets.

View MkhytarMkhoian's full-sized avatar
🏠
Working from home

Mkhytar Mkhoian MkhytarMkhoian

🏠
Working from home
View GitHub Profile
@wbroek
wbroek / genymotionwithplay.txt
Last active November 12, 2025 12:38
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)
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active October 26, 2025 18:45
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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
@meoyawn
meoyawn / EmptyRecyclerView.java
Created November 1, 2014 11:20
RecyclerView doesn't have an emptyView support, we gotta fix that
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class EmptyRecyclerView extends RecyclerView {
@Nullable View emptyView;
@lopspower
lopspower / README.md
Last active November 16, 2025 00:58
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@mindplace
mindplace / git_and_github_instructions.md
Last active September 24, 2025 11:29
Pushing your first project to github

1. Make sure git is tracking your project locally

Do you need a refresher on git? Go through Codecademy's git course.

  1. Using your terminal/command line, get inside the folder where your project files are kept: cd /path/to/my/codebase. → You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
    → Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.

  2. Check if git is already initialized: git status

@sevar83
sevar83 / ControllerLifecycle.kt
Last active August 30, 2019 13:56
Conductor / Glide lifecycle integration
import com.bumptech.glide.manager.Lifecycle
import com.bumptech.glide.manager.LifecycleListener
import com.bumptech.glide.util.Util
import java.util.*
/**
* A [com.bumptech.glide.manager.Lifecycle] implementation for tracking and notifying
* listeners of [com.bluelinelabs.conductor.Controller] lifecycle events.
*/
class ControllerLifecycle : Lifecycle {
@gildaswise
gildaswise / sliver_refresh_indicator.dart
Created September 13, 2018 20:08
Apple's and Android's refresh indicator to use with CupertinoSliverRefreshControl
import 'dart:math';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
Widget buildAppleRefreshIndicator(
BuildContext context,
RefreshIndicatorMode refreshState,
double pulledExtent,
double refreshTriggerPullDistance,
@Bringoff
Bringoff / DrawOverPermissionActivationListener.java
Last active February 14, 2019 09:30
Overlay drawing permission is activated on separate screen. But after activation that permission some users can't figure out how to return to the original app. Good approach is to open the app automatically after activation. The problem is we cannot listen to overlay permission changes. So here is workaround.
/**
* Looks like there is no adequate way to listen to this permission change, so do workaround here.
* Normally, we check the permission every 0.5 second. But on Oreo this won't work as Settings.canDrawOverlays still
* returns false after activation but before returning to the app (bug https://issuetracker.google.com/issues/66072795).
* Use OnOpChangedListener on Oreo.
*/
public class DrawOverPermissionActivationListener implements LifecycleObserver {
private AppCompatActivity activity;
private final OverlayManager overlayManager;
private final Class activityToBringToFrontOnDetection;
@RBusarow
RBusarow / TestCoroutineExtension.kt
Last active July 11, 2025 13:30
A JUnit 4 Rule and JUnit 5 Extension for utilizing TestCoroutineDispatcher and TestCoroutineScope from kotlinx.coroutines-test
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.TestCoroutineScope
import kotlinx.coroutines.test.resetMain
import kotlinx.coroutines.test.setMain
import org.junit.jupiter.api.extension.AfterAllCallback
import org.junit.jupiter.api.extension.AfterEachCallback
import org.junit.jupiter.api.extension.BeforeAllCallback
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.jupiter.api.extension.ExtensionContext