Skip to content

Instantly share code, notes, and snippets.

View dantmnf's full-sized avatar
💭
🀇🀇🀊🀋🀇🀊🀙🀡🀙🀡🀗🀐🀆

dantmnf

💭
🀇🀇🀊🀋🀇🀊🀙🀡🀙🀡🀗🀐🀆
  • On9 Technologies Ltd.
View GitHub Profile
@dantmnf
dantmnf / Huawei MateBook E Go (Wi-Fi).md
Last active April 6, 2024 19:33
Huawei MateBook E Go (Wi-Fi)

The Huawei MateBook E Go (Wi-Fi) is a Windows on ARM device based on Qualcomm Snapdragon 8cx Gen 3 platform at a reasonable price compared to Surface and ThinkPad.

Before you purchase…

Caveats

  • The native orientation of the display panel is portrait.
  • The keyboard cover doesn’t outperform 2015 Surface.
    • No backlight
    • No wired connection - lags
    • Doesn’t get disabled when flipped to back
  • The quality of touch panel and pen driver is questionable.
@dantmnf
dantmnf / fonts.sh
Last active February 26, 2024 12:51
one-key script to set correct font family fallbacks on Arch Linux (and maybe other distros)
#!/bin/bash
if (( EUID != 0 ))
then
echo "I need root!"
exit 1
fi
echo "writing /etc/fonts/conf.d/79-order.conf"
cat > /etc/fonts/conf.d/79-order.conf <<EOFC
<?xml version='1.0'?>
@dantmnf
dantmnf / winocr.py
Last active November 26, 2023 09:23
WinRT OcrEngine from Python
import sys
import asyncio
import base64
import copy
import pprint
# pip3 install winrt
from winrt.windows.media.ocr import OcrEngine
from winrt.windows.globalization import Language
from winrt.windows.graphics.imaging import *
from winrt.windows.security.cryptography import CryptographicBuffer
@dantmnf
dantmnf / foo.ps1
Last active August 6, 2023 13:13
some random notes
# hvix64.exe/hvax64.exe
bcdedit /set hypervisorloadoptions IOVTEST
# this will invalidate TPM protector
Suspend-Bitlocker $env:SystemDrive
# pci.sys
$pci_hackflags = Get-ItemPropertyValue HKLM:\SYSTEM\CurrentControlSet\Control\PnP\PCI -Name HackFlags
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\PnP\PCI -Name HackFlags -Value ($pci_hackflags -bor 0x80) -Type DWord
# from hyper-v error message
Set-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\HyperV -Name RequireSecureDeviceAssignment -Value 0 -Type DWord
Set-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\HyperV -Name RequireSupportedDeviceAssignment -Value 0 -Type DWord
@dantmnf
dantmnf / amdcpuid.ipynb
Created October 27, 2022 17:12
Forge Processor Name String on AMD CPUs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dantmnf
dantmnf / chnips.list
Last active June 12, 2022 14:38
Global proxy using badvpn-tun2socks
1.0.1.0/24
1.0.2.0/23
1.0.8.0/21
1.0.32.0/19
1.1.0.0/24
1.1.2.0/23
1.1.4.0/22
1.1.8.0/21
1.1.16.0/20
1.1.32.0/19
@dantmnf
dantmnf / Setup-VMGpuPartitionAdapter.ps1
Last active June 16, 2021 16:36
GPU-P setup script
$ErrorActionPreference = "Stop"
$vmobject = Get-VM | Out-GridView -Title "Select VM to setup GPU-P" -OutputMode Single
$vmid = $vmobject.VMId
Write-Host "Stopping VM"
$vmobject | Stop-VM
Write-Host "Disabling checkpoints for VM"
$vmobject | Set-VM -CheckpointType Disabled
Write-Host "Enabling heartbeat service for VM"
$vmobject | Enable-VMIntegrationService -Name Heartbeat
@dantmnf
dantmnf / gitwrapper.bat
Last active November 4, 2017 16:29
use cygwin git in vscode
@D:/cygwin64/bin/bash.exe /usr/bin/gitwrapper.sh "%*"
@dantmnf
dantmnf / local.conf.xml
Last active December 24, 2015 09:49
fontconfig configuration file
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="hinting"><bool>false</bool></edit>
<edit mode="assign" name="hintstyle"><const>hintnone</const></edit>
<edit mode="assign" name="rgba"><const>rgb</const></edit>
<edit mode="assign" name="antialias"><bool>true</bool></edit>
<edit mode="assign" name="lcdfilter"><const>lcddefault</const></edit>
@dantmnf
dantmnf / stm.c
Last active December 17, 2015 23:39
a small program to show the time spent from Windows startup
#define UNICODE
#include <windows.h>
#ifdef __GNUC__
#define wWinMain WinMain //MinGW does not support wWinMain
#define WINMAIN_CMDLINE_TYPE LPSTR
#else
#define WINMAIN_CMDLINE_TYPE LPWSTR
#endif