Skip to content

Instantly share code, notes, and snippets.

View hhhaiai's full-sized avatar
♠️
Focusing

hhhaiai hhhaiai

♠️
Focusing
View GitHub Profile
@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
@hhhaiai
hhhaiai / install_grpc.md
Last active December 26, 2022 07:21
Install gRPC++ on Ubuntu20.04

Solved step

# install dependencies,it's easy here
sudo apt install -y cmake
# install basic tools
sudo apt install -y build-essential autoconf libtool pkg-config

# clone from github and install it,I installed v1.51.1 here
git clone --recurse-submodules -b v1.51.1 https://github.com/grpc/grpc
cd grpc
@hhhaiai
hhhaiai / install_grpc.md
Created December 26, 2022 07:20
Install gRPC++ on Ubuntu20.04

Solved step

# install dependencies,it's easy here
sudo apt install -y cmake
# install basic tools
sudo apt install -y build-essential autoconf libtool pkg-config

# clone from github and install it,I installed v1.34.1 here
git clone --recurse-submodules -b v1.34.1 https://github.com/grpc/grpc
cd grpc
@hhhaiai
hhhaiai / config.json
Created December 21, 2022 05:58 — forked from wd/config.json
路由器梅林固件上面使用 v2ray 的方案
{
"log": {
"loglevel": "none"
},
"inbound": {
"port": 23456,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
@hhhaiai
hhhaiai / git-config-http-version.md
Created November 9, 2022 10:21 — forked from daopk/git-config-http-version.md
Fix error : RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400