Skip to content

Instantly share code, notes, and snippets.

View hhhaiai's full-sized avatar
🎯
Focusing

hhhaiai hhhaiai

🎯
Focusing
View GitHub Profile
@hhhaiai
hhhaiai / LocalWifiIP.md
Created September 24, 2023 06:54 — forked from mathieugerard/LocalWifiIP.md
Get Local Wifi IP address on iOS and Android

Get Local Wifi IP address on iOS and Android

This Gist provide the function to retrieve the local IP address of the device when connected to the wifi.

iOS

No permission is required from the user to access the information. It uses the getifaddrs method that is not directly part of the public iOS API but it's still perfectly fine to use it and allowed by Apple.

Sources

@hhhaiai
hhhaiai / amap.text
Created September 21, 2023 03:49 — forked from hydrz/amap.text
瓦片图说明
高德卫星 AmapSatellite
http://wprd04.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&style=6
高德地图 AmapTile
http://wprd04.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&style=7
高德路网含标注 AmapRoadMark
http://wprd04.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&scl=1&style=8
高德路网不含标注 AmapRoad
@hhhaiai
hhhaiai / fk_root.js
Created September 11, 2023 06:07 — forked from h1code2/main.js
FRIDA过ROOT检测 #root # frida
function showStacks() {
Java.perform(function() {
console.log(Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Exception").$new()));
});
}
function hook() {
Java.perform(function () {
const commonPaths = [
"/data/local/bin/su",
@hhhaiai
hhhaiai / xx
Last active September 1, 2023 13:37
vx
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import csv
# 颜色代码
RED = '\033[31m' # 红色
GREEN = '\033[32m' # 绿色
YELLOW = '\033[33m' # 黄色
BLUE = '\033[34m' # 蓝色
PURPLE = '\033[35m' # 紫色
@hhhaiai
hhhaiai / gist:5d381a36a42640437e396935b23db203
Last active July 31, 2023 01:03 — forked from 0x9be00ff1/gist:3552281
sublime配置文件详解
// While you can edit this file, it’s best to put your changes in
// "User/Preferences.sublime-settings", which overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
// 主题文件的路径
//"color_scheme": "Packages/Color Scheme – Default/Monokai.tmTheme",
import android.app.AppComponentFactory;
import android.content.pm.ApplicationInfo;
import android.util.Log;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.ZipFile;
@hhhaiai
hhhaiai / 8GB_android-10_compilation-note
Created June 15, 2023 08:14 — forked from mikecriggs/8GB_android-10_compilation-note
Workarounds for building Android 10 on 8GB RAM
Workarounds for building Q on 8GB RAM environment:
1. At the start of the build:
[ 99% 138/139] /mnt/ssd/aosip/out/soong/.bootstrap/bin/soong_build /mnt/ssd/aosip/out/soong/build.ninja
This used to take around 30mins, after enabling zram now it takes around 30secs (thanks to @kdrag0n for the zram idea) which is on par with what happens in 16GB RAM building environments
sudo apt install zram-config for installing zram-config package
sudo nano /etc/fstab and add a # in front of the swap disk if you have one and then reboot
After booting cat /proc/swaps to check if zram is enabled or not
@hhhaiai
hhhaiai / docker_usb_guest_osx.md
Created January 31, 2023 08:33 — forked from stonehippo/docker_usb_guest_osx.md
Getting a USB device to show up in a Docker container on OS X

Getting a USB device to show up in a Docker container on OS X

Some background

I was trying to get the Arduino IDE to work inside a Docker container on OS X. I was able to get the IDE working (see Getting X11 GUI applications to work on OS X with Docker), but I could not figure out how to make the USB port for the Arduino visible.

The solution

I first tried to directly map hardware serial port into the Docker container, doing something like this:

@hhhaiai
hhhaiai / MagiskSupport.md
Created January 13, 2023 01:58 — forked from assiless/MagiskSupport.md
MagiskOnRedroid
setup variables for commands
echo -e "\n
export image=redroid/redroid:11.0.0-amd64
export image_tar=${HOME}/redroid:11.0.0-amd64" >> ${HOME}/.bashrc
source ${HOME}/.bashrc
@hhhaiai
hhhaiai / MagiskSupport.md
Created January 13, 2023 01:58 — forked from assiless/MagiskSupport.md
MagiskOnRedroid
setup variables for commands
echo -e "\n
export image=redroid/redroid:11.0.0-amd64
export image_tar=${HOME}/redroid:11.0.0-amd64" >> ${HOME}/.bashrc
source ${HOME}/.bashrc