Skip to content

Instantly share code, notes, and snippets.

View huming2207's full-sized avatar
💭
I may be slow to respond.

Jackson Ming Hu huming2207

💭
I may be slow to respond.
  • SmartGuide Pty Ltd.
  • Melbourne, VIC, Australia
  • 11:15 (UTC +10:00)
  • X @huming2207
View GitHub Profile
@huming2207
huming2207 / guid.h
Created January 22, 2023 09:22 — forked from AlexBAV/guid.h
Constexpr GUID parsing (parsing string GUIDs at compile-time)
//-------------------------------------------------------------------------------------------------------
// constexpr GUID parsing
// Written by Alexander Bessonov
//
// Licensed under the MIT license.
//-------------------------------------------------------------------------------------------------------
#pragma once
#include <stdexcept>
#include <string>
@huming2207
huming2207 / cmake.log
Last active May 18, 2022 23:55
Failed DSView compilation log
CMake Deprecation Warning at CMakeLists.txt:22 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
@huming2207
huming2207 / Stm32L0x1Eraser.py
Created November 8, 2020 03:02
STM32L0x1 Mass erase with pyOCD
from pyocd.core.exceptions import TransferError
from pyocd.core.helpers import ConnectHelper
from pyocd.core.target import Target
from usb.core import USBError
import time
class Stm32L0x1Eraser():
FLASH_PECR = 0x40022004
FLASH_PDKEYR = 0x40022008
FLASH_PKEYR = 0x4002200C
@huming2207
huming2207 / dmesg.after.wake.up.log
Created October 28, 2019 07:12
Manjaro KDE + NVIDIA driver suspend/wakeup issue
[ 0.000000] Linux version 5.3.6-1-MANJARO (builduser@manjaro) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Sat Oct 12 09:30:05 UTC 2019
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.3-x86_64 root=UUID=adc87bdb-0f31-496d-96e9-9661347241de rw quiet apparmor=1 security=apparmor resume=UUID=6d56cf91-8a5b-4309-9e6a-1c6bcbb99b33 udev.log_priority=3
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] zhaoxin Shanghai
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
@huming2207
huming2207 / index.js
Created January 28, 2019 00:51
Axios test
const axios = require('axios');
axios.get('http://api.openweathermap.org/data/2.5/weather', { params: {
q: 'Shaoshan,CN',
appid: 'bad3e42bbdd0c77587f16d3c9b4145e3',
units: 'metric'
}}).then(function (resp) {
console.log(resp.data);
}).catch(function (err) {
console.log(err);
@huming2207
huming2207 / ramoops-miui.log
Created April 9, 2018 12:50
MIUI failed to boot with custom kernel
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Initializing cgroup subsys schedtune
[ 0.000000] Linux version 4.4.78-perf-g75499d8cf0bf-dirty (hu@hu-desktop) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Apr 9 18:32:33 AEST 2018
[ 0.000000] Boot CPU: AArch64 Processor [51af8014]
[ 0.000000] Powerup reason=0x40021
[ 0.000000] Machine: Qualcomm Technologies, Inc. MSM 8998 v2.1 MTP
[ 0.000000] ramoops: msm_reserve_ramoops_memory addr=b0000000,size=400000
@huming2207
huming2207 / Widora32M-SoftSPI.dts
Created January 11, 2018 07:22
Problemed SPI-GPIO
/dts-v1/;
/include/ "mt7628an.dtsi"
/ {
compatible = "mediatek,widora32m", "mediatek,mt7628an-soc";
model = "Widora32M";
chosen {
bootargs = "console=ttyS0,115200";
@huming2207
huming2207 / im_merge.sh
Created December 17, 2017 05:54
ImageMagick photo collage
#!/bin/bash
# By Jackson Ming Hu, 2017
# Users should rename and their photos to some paths with digit, e.g. ./0/foo.jpg, ./0/bar.jpg
for i in {2..10}
do
echo "Converting $i.jpg..."
convert ./$i/*.jpg -geometry +3+3 -border 2%x1% -bordercolor White -gravity Center -resize 50% -quality 85 -append $i.jpg
done
@huming2207
huming2207 / dmesg.log
Created October 22, 2017 03:02
Hotspot log, LinageOS 14.1 1021
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Initializing cgroup subsys schedtune
[ 0.000000] Linux version 4.4.94-perf-gb5be40b90dba-26746-g8ca0c8d2bbcb (hu@hu-thinkpad) (gcc version 7.1.1 20170707 (crosstool-NG crosstool-ng-1.23.0-236-g42429d91) ) #1 SMP PREEMPT Sun Oct 22 12:34:39 AEDT 2017
[ 0.000000] Boot CPU: AArch64 Processor [51af8014]
[ 0.000000] Powerup reason=0x40001
[ 0.000000] Machine: Qualcomm Technologies, Inc. MSM 8998 v2.1 MTP
[ 0.000000] ramoops: msm_reserve_ramoops_memory addr=b0000000,size=400000
@huming2207
huming2207 / unofficial.logcat.log
Created October 8, 2017 11:16
unofficial build logcat
This file has been truncated, but you can view the full file.
--------- beginning of system
10-08 22:11:32.850 1820 1820 W PackageManager: Unknown permission com.qihoo360.launcher.permission.READ_SETTINGS in package com.eg.android.AlipayGphone
10-08 22:11:32.850 1820 1820 W PackageManager: Unknown permission com.qihoo360.launcher.permission.WRITE_SETTINGS in package com.eg.android.AlipayGphone
10-08 22:11:32.850 1820 1820 W PackageManager: Unknown permission com.lge.launcher.permission.READ_SETTINGS in package com.eg.android.AlipayGphone
10-08 22:11:32.850 1820 1820 W PackageManager: Unknown permission com.lge.launcher.permission.WRITE_SETTINGS in package com.eg.android.AlipayGphone
10-08 22:11:32.850 1820 1820 W PackageManager: Unknown permission net.qihoo.launcher.permission.READ_SETTINGS in package com.eg.android.AlipayGphone
10-08 22:11:32.850 1820 1820 W PackageManager: Unknown permission net.qihoo.launcher.permission.WRITE_SETTINGS in package com.eg.android.AlipayGphone
10-08 22:11:32.850 1820 1820 W PackageManager: Unknown permission org.adw.launche