Skip to content

Instantly share code, notes, and snippets.

View huhuang03's full-sized avatar
😀
please focus

Aha huhuang03

😀
please focus
View GitHub Profile
@huhuang03
huhuang03 / reg
Created September 9, 2022 15:07
windows map cap to ctrl
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
FROM ubuntu:14.04
ARG username=root
RUN sed -i s@/archive.ubuntu.com/@/mirrors.163.com/@g /etc/apt/sources.list
RUN apt-get update && apt-get install -y git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip python openjdk-7-jdk
RUN apt install -y vim
ENV HTTP_PROXY="http://192.168.0.5:7890"
import 'package:flutter/material.dart';
import 'package:reorderable_grid_view/reorderable_grid_view.dart';
class TestIssue24 extends StatefulWidget {
TestIssue24({Key? key});
@override
_TestIssue24State createState() => _TestIssue24State();
}
@huhuang03
huhuang03 / gist:c68fd56f6dbcd08d3eb8cf4c46862ef1
Last active September 18, 2020 08:29 — forked from eggfly/gist:65ff355a8326c55a7621e13384917f5a
Compile Python for Android on mac (Not Work!!!!, don not use this)
#!/bin/sh
#
# This script builds & bundles Python for Android
# You'll end up with a tar.bz2 file that contains a Python distribution
#
# Requires all prerequisites to build Android on the host, and the NDK
# installed.
#
# This script creates a file python4android.tbz2. Unpack it on your device
# (into a non-noexec partition!) and enjoy.
@huhuang03
huhuang03 / aa
Created August 12, 2020 02:26
Android: How to remove margin/padding in Preference Screen
https://stackoverflow.com/questions/18509369/android-how-to-remove-margin-padding-in-preference-screen
Simple working solution from here.
It works across all preferences without need write to all preferences app:iconSpaceReserved="false"
Create res/values-sw360dp/values-preference.xml:
<resources xmlns:tools="http://schemas.android.com/tools">
<bool name="config_materialPreferenceIconSpaceReserved" tools:ignore="MissingDefaultResource,PrivateResource">false</bool>
<dimen name="preference_category_padding_start" tools:ignore="MissingDefaultResource,PrivateResource">0dp</dimen>
# QEmu
brew install qemu
# Home for out tests
mkdir ~/arm-emu
cd ~/arm-emu
# Download initrd and kernel
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-armel/current/images/versatile/netboot/initrd.gz
@huhuang03
huhuang03 / opencv snipts
Last active July 29, 2020 15:17
open use opencv snipt
cv::Mat_<cv::Vec3b>::iterrator it = image.begin<cv::Vec3b>();
cv::Mat_<cv::Vec3b>::const_iterrator it = image.begin<cv::Vec3b>();
#include <android/log.h>
#define TAG "projectname" // 这个是自定义的LOG的标识
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG ,__VA_ARGS__) // 定义LOGD类型
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,TAG ,__VA_ARGS__) // 定义LOGI类型
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,TAG ,__VA_ARGS__) // 定义LOGW类型
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG ,__VA_ARGS__) // 定义LOGE类型
#define LOGF(...) __android_log_print(ANDROID_LOG_FATAL,TAG ,__VA_ARGS__) // 定义LOGF类型
@huhuang03
huhuang03 / GitConfigHttpProxy.md
Created May 16, 2020 11:09 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

repo sync -f --force-sync --no-clone-bundle --no-tags -j$(nproc --all)