Skip to content

Instantly share code, notes, and snippets.

View sergchil's full-sized avatar

Sergey Chilingaryan sergchil

View GitHub Profile
@sergchil
sergchil / android.txt
Created June 23, 2022 18:53 — forked from srishanbhattarai/android.txt
Android Emulator CPU/Memory high usage solution
https://stackoverflow.com/questions/37063267/high-cpu-usage-with-android-emulator-qemu-system-i386-exe
The cause of the constant CPU usage is the sound. If you do not need sound in your emulator you can disable it by editing the AVD's config file.
Change/add those two lines
hw.audioInput=no
hw.audioOutput=no
On Linux/Mac the file is located at ~/.android/avd/<AVD_Name>.avd/config.ini
On Windows the file is located at C:\Users\<username>\.android\avd\<AVD_Name>.avd\config.ini
@sergchil
sergchil / adbwificonnect.sh
Created September 26, 2019 11:42 — forked from amanshuraikwar/adbwificonnect.sh
Shell script to connect a USB connected device via adb over WiFi MacOS
# Purpose: Shell script to connect a USB connected device via adb over WiFi
#
# Author: Amanshu Raikwar
#
# Assumptions:
# 1. USB debugging is enabled in the Android device
# 2. The Android device is connected to the computer via USB
# 3. The Android device is connected to the same wifi as the computer
# 4. The Android device is accessible through port 5555 over the wifi network
#

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

package pl.kpob.utils.extensions
import android.app.Activity
import android.content.Context
import android.graphics.Color
import android.support.v4.content.ContextCompat
import android.view.WindowManager
import flow.Flow
import org.jetbrains.anko.AlertDialogBuilder
import pl.sisms.gminformix.utils.extensions.supportsLollipop