Skip to content

Instantly share code, notes, and snippets.

View eggfly's full-sized avatar
🎯
flutter-hacking

eggfly

🎯
flutter-hacking
  • Beijing
View GitHub Profile
package com.xinghui.notificationlistenerservicedemo;
import android.app.ActivityManager;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.Process;
@eggfly
eggfly / SystemPropertiesProxy
Created March 8, 2020 02:37 — forked from crossle/SystemPropertiesProxy
Use the reflection invoke SystemProperites
import java.lang.reflect.Method;
public class SystemPropertiesProxy {
/**
* This class cannot be instantiated
*/
private SystemPropertiesProxy() {
}
@eggfly
eggfly / blog_esp8266_series_AP_STA.ino
Created June 23, 2020 14:50 — forked from futechiot/blog_esp8266_series_AP_STA.ino
ESP8266 in Both Mode AccesssPoint and Station mode, you can connect with esp8266 using your mobile and your ESP8266 connects to your another wifi connection(Home router,) both mode work simultaneously
/*
OUTCOME: Esp8266 Hotspot as well as Connecting your Esp8266 to any Wifi NETWORK(Mobile Hotspot,Home Route)
Author: Ankit Rana (Futechiot)
Board Used: Wemos d1 mini, Wemos d1 mini pro, Node MCU
Website: www.futechiot.com
GitHub: https://github.com/futechiot
package com.qihoo.util;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.util.Log;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@eggfly
eggfly / armasm.dart
Created December 17, 2020 08:45 — forked from pingbird/armasm.dart
Little ARM assembler in dart
// By PixelToast
var src =
"mov r0, #69\n"
"bx lr\n"
"ldmedeq ip!, {a3-sp}\n"
"strbhi r13, [v2, lr, asr #3]!\n"
"ldrls a3, [sb], sp, asr #0x14\n";
main() {
@eggfly
eggfly / armasm.dart
Created December 17, 2020 08:45 — forked from pingbird/armasm.dart
Little ARM assembler in dart
// By PixelToast
var src =
"mov r0, #69\n"
"bx lr\n"
"ldmedeq ip!, {a3-sp}\n"
"strbhi r13, [v2, lr, asr #3]!\n"
"ldrls a3, [sb], sp, asr #0x14\n";
main() {
@eggfly
eggfly / AdjustingViewGlobalLayoutListener.java
Created January 5, 2021 09:32 — forked from ryandt/AdjustingViewGlobalLayoutListener.java
An OnGlobalLayoutListener interface that will adjust and resize a fullscreen scene's view when the soft keyboard is shown or hidden. This interface provides custom layout behavior to the 'adjustResize' windowSoftInputMode for a View layout by enforcing an adjustable container with the option of a static footer view.
import android.animation.ObjectAnimator;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
/**
* An OnGlobalLayoutListener interface that will adjust and resize a fullscreen scene's view when the soft keyboard is shown
* or hidden.
*
@eggfly
eggfly / DartVMOptions.txt
Created January 15, 2021 09:48 — forked from azenla/DartVMOptions.txt
Dart VM Options
[kaendfinger@localhost Dart]$ dart --help -v
Usage: dart [<vm-flags>] <dart-script-file> [<dart-options>]
Executes the Dart script passed as <dart-script-file>.
Supported options:
--checked or -c
Insert runtime type checks and enable assertions (checked mode).
--help or -h
Display this message (add -v or --verbose for information about
@eggfly
eggfly / LibraryLoaderHelper.java
Created August 11, 2021 08:10 — forked from NLMartian/LibraryLoaderHelper.java
The class provides helper functions to extract native libraries from APK, and load libraries from there.
package org.chromium.base.library_loader;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Build;
import android.util.Log;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@eggfly
eggfly / read_guid.ino
Created September 28, 2021 03:49 — forked from ksasao/read_guid.ino
Read GUID of LGT8F328P
void setup() {
Serial.begin(9600);
delay(1000);
// read GUID of LGT8F328P
// https://www.avrfreaks.net/sites/default/files/forum_attachments/LGT8F88P%20LGT8F168P%20LGT8F328P%20translated.pdf
// if you want to read other device's unique id, use ArduinoUniqueID
// https://www.arduinolibraries.info/libraries/arduino-unique-id
#ifdef _LGT8F328P_SPEC_H_
char buf[10];