Skip to content

Instantly share code, notes, and snippets.

View valinet's full-sized avatar

Valentin Radu valinet

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>Add</key>
<array>
<dict>
<key>Comment</key>
@valinet
valinet / README.md
Last active February 4, 2024 08:24
Fix Task Manager blurriness on different DPI monitors in Windows 10

Fix Task Manager blurriness on different DPI monitors in Windows 10

Task Manager on Windows 10 is blurry on secondary monitors if they have a different DPI from the primary monitor. This is because Task Manager is only PROCESS_SYSTEM_DPI_AWARE, despite being a relatively new application (a new Task Manager was introduced in Windows 8). This can be confirmed by using a tool such as Resource Hacker and checking the manifest file for this:

<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
    <dpiAware>true</dpiAware>
    <autoElevate>true</autoElevate>
</asmv3:windowsSettings>
@valinet
valinet / README.md
Last active February 16, 2024 20:51
Get dark command windows all the time in Windows

Case study: Get dark command windows all the time in Windows

TL;DR

  1. Make a copy conhost.exe from System32.
  2. Open it with a hex editor (I use HxD).
  3. In HxD, go to Search - Find - Hex-values.
  4. Search for 881d9e530a004885c07477ff15b32e08009084c0.
  5. In Windows 10 version 2004, replace ff15b32e0800 with 909090909090. If using Windows 10 version 20H2, replace ff15b32e08009084 with 9090909090909090.
  6. Save file and copy it back to System32 (take ownership of original conhost.exe in order to replace it).
  7. Profit!
@valinet
valinet / Overview.md
Last active November 24, 2020 23:06
Overview

Welcome to my Git repo. Bellow you can find a list of projects I am working on, sorted chronologically by date of last 'commit':

  • EtherCard-MDNS - Simple multicast DNS name resolution and service discovery library for EtherCard library that works with the ENC28J60 module.

  • homepi+ - homepi+ is an Arduino based implementation of a home control system. . It interfaces and communicates with various hardware devices in order to provide a single point of control for all of them. It is used to control all the electric and electronic equipment in my study room, from light fixtures to computers and laptops. The user interacts with the service using a simple web application which is accessible from any device which has a browser, so pretty much any modern smart device, and can control it not only from the local network, but also from the larger Internet using a robust and secure security mechanism.

  • [homepi-android-client](htt

@valinet
valinet / Convert files to PDF using Puppeteer (Chromium).js
Created July 23, 2020 18:35
Convert files to PDF using Puppeteer (Chromium)
/*
Convert files to PDF using Puppeteer (Chromium)
Copyright (c) 2020 Valentin-Gabriel Radu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@valinet
valinet / Get browser forward gesture on Android 10 Pixel Experience Plus ROM for Poco F1.md
Created June 16, 2020 00:41
Shows how to patch SystemUI with the purpose of achieving said functionality

Get browser forward gesture on Android 10 Pixel Experience Plus ROM for Poco F1

Works in Chrome.

(This technique possibly works for other models as well, but you need to understand it and adapt it for your use case; it is copy-paste for Poco F1 only)

Disclaimer: my code makes the "long swipe" gesture unavailable, as I was not using it, but with patience you can come up with a better patch that may retain that functionality as well. This is more for me to remember how I did it and for educational purposes (finding pertinent and updated Android tutorials on stuff like this is pretty hard).

I have done the process on Windows with the help of WSL2, on Linux it should work 100%, maybe with other utilities.

@valinet
valinet / runpe64.cpp
Last active March 30, 2024 13:47
RunPE for x64
/*
RunPE for x64 - classic RunPE for 64-bit executables
Copyright (C) 2020 Valentin-Gabriel Radu
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,