Skip to content

Instantly share code, notes, and snippets.

View ijat's full-sized avatar
🏠
Working from home

Ijat ijat

🏠
Working from home
View GitHub Profile
@ijat
ijat / gist:639d2ea54d386bd69aa63fe94a3b71cf
Created August 24, 2020 02:08
pgina fork reset local user password command
Recommended to use with Scripting plugin -> Event Notification -> Tick (logon & logoff)
cmd.exe /c net user "%u" "%p" >> %PUBLIC%\reset_log.txt
@ijat
ijat / main.cpp
Created September 4, 2020 10:48
Test winhttpopen
#include <iostream>
#include <string>
#include <Windows.h>
#include <winhttp.h>
#pragma comment(lib, "winhttp.lib")
int main() {
DWORD data;
@ijat
ijat / check.cpp
Created September 5, 2020 03:22
Check if Windows 8.1 or higher c++
bool IsWindows81orHigher() {
NTSTATUS(WINAPI * RtlGetVersion)(LPOSVERSIONINFOEXW);
OSVERSIONINFOEXW osInfo;
*(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandleA("ntdll"), "RtlGetVersion");
if (NULL != RtlGetVersion)
{
osInfo.dwOSVersionInfoSize = sizeof(osInfo);
RtlGetVersion(&osInfo);
@ijat
ijat / gist:e843c541f4bf2e2ea7abd5258d2b804a
Created December 12, 2020 10:02
How to remove Command Bar in OldNewExplorer for Windows 10 (Tested on 20H2)
1. Download your OldNewExplorer 1.1.9. If you already install, uninstall the extension again.
2. Download Resource Hacker.
3. Run Resource Hacker, and open OldNewExplorer64.dll.
4. Expand STYLE_FLAT or STYLE_CREAMY (your choice), then select 1:1033.
5. Ctrl+F to open Find window, and search for FolderBandStyle. You'll find something like this "<style resid="FolderBandStyle">"
6. Then, below that line, enter this text: <Element padding="rect(0rp,0rp,0rp,-44rp)"/>
7. Repeat step 5-6 by finding this keyword: CPLFolderBandStyle
8. Click Compile Script (play icon) or press F5.
9. Save the dll using same name (overwrite).
10. Repeat step 3-9 by opening OldNewExplorer32.dll
@ijat
ijat / StringCompressionExtension.cs
Created December 21, 2020 15:36
Dotnet string / text compression and decompression extension
public static class StringCompressionExtension
{
/// <summary>
/// Compresses the string to bytes array.
/// </summary>
/// <param name="text">The text.</param>
/// <returns></returns>
public static byte[] Compress(this string text)
{
byte[] buffer = Encoding.UTF8.GetBytes(text);
@ijat
ijat / conf.xml
Created January 23, 2021 08:29 — forked from Anime4000/conf.xml
Maxis TP-Link Archer C5v
<?xml version="1.0"?>
<DslCpeConfig>
<InternetGatewayDevice>
<DeviceSummary val="InternetGatewayDevice:1.1[](Baseline:1, EthernetLAN:1)" />
<LANDeviceNumberOfEntries val=2 />
<WANDeviceNumberOfEntries val=3 />
<DeviceInfo>
<ManufacturerOUI val=F8D111 />
<SerialNumber val=0000000000000 />
<HardwareVersion val="Archer C5v v1 00000000" />