Skip to content

Instantly share code, notes, and snippets.

View jeffypooo's full-sized avatar
🔥

Jefferson Jones jeffypooo

🔥
View GitHub Profile
@jeffypooo
jeffypooo / Phone.kt
Last active June 29, 2019 20:37 — forked from espinchi/DeviceUtil.java
Check if the running device is an emulator
import android.os.Build;
/**
* Utility methods related to physical devies and emulators.
*/
object Phone {
val isEmulator: Boolean get() {
return Build.FINGERPRINT.startsWith("generic")
|| Build.FINGERPRINT.startsWith("unknown")
@jeffypooo
jeffypooo / adbwifi.sh
Last active September 25, 2019 16:25 — forked from stormzhang/adbwifi.sh
shell script for adb wifi
#!/bin/bash
REGEX_DEV_TCPIP="192\.168\.[0-9].*"
REGEX_INET_IP_1="inet (192\.168\.[0-9]\.[0-9]{1,3})"
REGEX_INET_IP_2="[0-9\.]+"
#List the devices on the screen for your viewing pleasure
echo "listing devices..."
adb devices
echo
@jeffypooo
jeffypooo / gist:84793e93f0b3c588861a24a2f6008a38
Last active April 18, 2018 22:11 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.