Skip to content

Instantly share code, notes, and snippets.

View std-microblock's full-sized avatar
🍊
吃橘子

MicroBlock std-microblock

🍊
吃橘子
View GitHub Profile
@std-microblock
std-microblock / main.md
Last active November 6, 2026 07:05
关于"小米反诈监控"传闻的技术核验

结论

传闻中"系统内置反诈数据库、记录截屏时间与通话、屏幕共享行为"这部分属实;"域名用途"部分与实际不符;"GuardProvider 静默录屏"在部分机型上属实;"关掉开关仍在运行""卸载 GuardProvider 无效"属实;"669 次连续读写""每台手机都在录"不成立。


一、功能名称与开关位置

传闻描述的行为属于手机管家中的"电诈防护",不是独立的后台程序。

@std-microblock
std-microblock / free_current_module.cc
Created March 29, 2025 19:06
Free current module.
#include "free_current_module.h"
#include "blook/blook.h"
#include <Windows.h>
#include <thread>
struct ReallocInfo {
void *new_addr;
void *old_addr;
==Qfi0DM5p2SrcldmNHU4s0QFZVRUd3QCBzVDxWTJNlY5cFZ5Fkb04EZ0MjdDhjNiojI5V2aiwiIiojIpBXYiwiIiojI5FGblJnIsIyYj5yaj9Gbi9mcjlWbuUGdzFGciojI0N3boJye
@std-microblock
std-microblock / diffEditHTML.js
Last active February 1, 2025 18:53
diffEditHTML
function diffEditHTML(after, oldDOM) {
const newDOM = document.createElement('div');
newDOM.innerHTML = after;
const newChildNodes = [...newDOM.childNodes],
oldChildNodes = [...oldDOM.childNodes];
let diffStart = Number.POSITIVE_INFINITY;
for (let i = 0; i < Math.max(newChildNodes.length, oldChildNodes.length); i++) {
const newChildDom = newChildNodes[i], oldChildDom = oldChildNodes[i];
if (!!newChildDom && !!oldChildDom) {
if ((newChildDom.innerHTML && !oldChildDom.innerHTML) ||
@std-microblock
std-microblock / test.cpp
Created January 26, 2025 10:31
Simple glfw&glad transparent window test
#include "glad/glad.h"
#include "GLFW/glfw3.h"
int main() {
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@std-microblock
std-microblock / fanctrl.sh
Created January 27, 2024 12:21
Basic fan control script for P40
#!/bin/bash
# Check if running with sudo
if [ "$EUID" -ne 0 ]; then
echo "Please run with sudo:"
echo "sudo $0"
exit
fi
# Enable PWM
@std-microblock
std-microblock / cloneEx.js
Created August 17, 2023 08:22
Create an element delegate/proxy in js
const createElementDelegate = (ele, config) => {
const old2NewMap = new WeakMap(), new2OldMap = new WeakMap();
const clone = (ele, {cloneParent, syncProps, delegateEvents=true, delayedElementListChange}={}) => {
if(ele == null) return ele;
// clone, and delegate events, and preserve parent classes
let cloned = ele.cloneNode();
old2NewMap.set(ele, cloned);
new2OldMap.set(cloned, ele);
// clone child also
@std-microblock
std-microblock / ProgressFloatingWindow.js
Created July 13, 2023 17:32
进度浮窗,支持多窗口
class FloatingWindow {
static instanceCount = 0;
constructor() {
let body = document.body;
this.containerDiv = document.createElement('div');
this.containerDiv.setAttribute('style',
`bottom: ${10 + 110 * FloatingWindow.instanceCount}px;`
);
@std-microblock
std-microblock / findPaths.js
Last active April 20, 2024 08:35
find value in object
function findPaths(obj, kwd, maxDepth = 1, exclude=[]) {
const paths = [];
function exploreObject(obj, path, depth) {
if (depth > maxDepth) {
return;
}
for (const key in obj) {
const value = obj[key];