Skip to content

Instantly share code, notes, and snippets.


Hello World mcxiaoke

  • Earth
View GitHub Profile
View brightness_ctl_DDC.cpp
// Phys monitor control via DDC/CI or VESA commands
// (David Lowndes)
// From
#include <Windows.h>
#include <physicalmonitorenumerationapi.h>
#include <highlevelmonitorconfigurationapi.h>
#pragma comment( lib, "Dxva2.lib" )
mcxiaoke / crc16.c
Created Jun 12, 2021 — forked from tijnkooijmans/crc16.c
View crc16.c
uint16_t crc16(char* pData, int length)
uint8_t i;
uint16_t wCrc = 0xffff;
while (length--) {
wCrc ^= *(unsigned char *)pData++ << 8;
for (i=0; i < 8; i++)
wCrc = wCrc & 0x8000 ? (wCrc << 1) ^ 0x1021 : wCrc << 1;
return wCrc & 0xffff;
mcxiaoke / msys2.reg
Created Jun 8, 2021 — forked from magthe/msys2.reg
MSYS2 "Open Here" registry settings
View msys2.reg
Windows Registry Editor Version 5.00
@="Open MSYS2 here"
@="c:\\msys64\\usr\\bin\\mintty.exe /bin/sh -lc 'cd \"$(cygpath \"%V\")\"; exec bash'"
@="Open MSYS2 here"

OpenWrt Docker镜像构建


其实使用OpenWrt的固件, 可以很方便的构建Docker镜像,这里的固件不光是官方固件,也可以是经过自己定制编译生成的固件。


mcxiaoke / windows-terminal-config.json
Last active Jun 8, 2021
Windows Terminal Profiles Settings
View windows-terminal-config.json
"$schema": "",
// Add custom actions and keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about actions and keybindings, visit
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
// To learn more about selection, visit
mcxiaoke / profile.ps1
Created Jun 3, 2021 — forked from timsneath/profile.ps1
PowerShell template profile: adds some useful aliases and functions
View profile.ps1
### PowerShell template profile
### Version 1.03 - Tim Sneath <>
### From
### This file should be stored in $PROFILE.CurrentUserAllHosts
### If $PROFILE.CurrentUserAllHosts doesn't exist, you can make one with the following:
### PS> New-Item $PROFILE.CurrentUserAllHosts -ItemType File -Force
### This will create the file and the containing subdirectory if it doesn't already
### As a reminder, to enable unsigned script execution of local scripts on client Windows,
mcxiaoke /
Last active Jun 15, 2021
Windows 10 Tips

Windows Tips

Repair System Errors

DISM.exe /Online /Cleanup-image /Restorehealth
sfc /scannow
mcxiaoke / 7z-benchmarks.txt
Created May 14, 2021
7z benchmak on three devices
View 7z-benchmarks.txt
x64 MacBook Pro 2013 i3-4285u
CPU Freq: 2624 2781 2885 2891 2882 2872 2877 2867 2864
RAM size: 8192 MB, # CPU hardware threads: 4
RAM usage: 882 MB, # Benchmark threads: 4
Compressing | Decompressing
Dict Speed Usage R/U Rating | Speed Usage R/U Rating
mcxiaoke /
Created Mar 6, 2021 — forked from tombigel/
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in's Wayback Machine

Mac OS X

To check the current limits on your Mac OS X system, run: