Skip to content

Instantly share code, notes, and snippets.

set JVMArguments=-Xms3072m -Xmx3072m
if '%~1'=='1.7' set Version=7.10
if '%Version%'=='7.10' goto :1.7
if '%~1'=='1.8' set Version=8.9
if '%Version%'=='8.9' goto :1.8
if '%~1%'=='1.12' set Version=1.12
if '%Version%'=='1.12' goto :1.12
@Aetopia
Aetopia / Python Functions.md
Last active April 29, 2022 15:56
Python Functions

This is a gist where you can find handy Python Functions for your projects!
Feel free to use them! ;D

@Aetopia
Aetopia / detect if running conhost.py
Created June 13, 2022 04:59
Process Traceback + Detect if using Conhost.
from wmi import WMI
from os import getpid
pid = getpid()
Win32_Process = WMI().Win32_Process()
conhost = ()
is_conhost = False
def process_traceback(pid: int):
processes, length = (), [None, None]
while True:
length[0] = len(processes)
@Aetopia
Aetopia / uac.cmd
Last active July 2, 2022 14:47
Simple UAC Prompt for the Windows Command Line.
@echo off
set __COMPAT_LAYER=RunAsInvoker
choice.exe /N /C YN /M "Elevate? (Y/N?) > "
if %errorlevel% == 1 (
echo Elevation Granted!
start /b %*
exit /b 0
) else (
if %errorlevel% == 2 (
echo Elevation Denied!
@Aetopia
Aetopia / main.c
Created September 2, 2022 12:04
Couleur's Pathed But in ©️!
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char *strcmb(char *str1, char *str2, char *str3, char *str4)
{
// Combines and puts the combined string in memory.
char *str = (char *)malloc(strlen(str1) + strlen(str2) + strlen(str3) + strlen(str4) + 1);
sprintf(str, "%s%s%s%s", str1, str2, str3, str4);
return str;
@Aetopia
Aetopia / Steam.ps1
Last active January 14, 2023 06:45
Steam Related Functions
function Get-SteamPath {
# Get the Steam installation directory.
# MUICache
$muicache = "Registry::HKCR\Local Settings\Software\Microsoft\Windows\Shell\MuiCache"
$protocol = "Registry::HKCR\steam\Shell\Open\Command"
# MUICache
$steam = Split-Path (((Get-Item $MuiCache).Property | Where-Object {$PSItem -Like "*Steam*"} | Where-Object {(Get-ItemPropertyValue $MuiCache -Name $PSItem) -eq "Steam"}).TrimEnd(".FriendlyAppName"))
# Steam Browser Protocol
@Aetopia
Aetopia / dwmcfg.nim
Created December 28, 2022 03:50
DWMCFG
import winim
import os
const
tsz = 4
fsz = 0
let cmdline = commandLineParams()
var
t = true
@Aetopia
Aetopia / README.md
Last active January 10, 2023 12:45
ZetaLoader

Nim Fork of ZetaLoader.

Build:

  1. main.nim

    nim c -d:release --app:gui -o:"ZetaLoader.exe" main.nim
    
  2. dll.nim

@Aetopia
Aetopia / README.md
Last active January 25, 2023 04:01
Desktop Window Manager Idle Tool

I wanted to see if there was any benefit of making Desktop Window Manager entirely idle when its running. Which includes settings its thread priorities and process priority to idle.
So feel free to test this.

You can build this project using GCC:

gcc -mwindows -s dwmidle.c -lWtsapi32 -o "DWMIdle.exe"
@Aetopia
Aetopia / LaunchSteam.c
Last active January 29, 2023 15:22
Wait for an internet connection then launch a minimal instance of Steam.
#include <windows.h>
#include <wininet.h>
#include <libgen.h>
int main(__attribute__((unused)) int argc, char *argv[])
{
SetCurrentDirectory(dirname(argv[0]));
while (!InternetGetConnectedState(NULL, 0))
Sleep(1);
// Steam Command Line Parameters: https://developer.valvesoftware.com/wiki/Command_Line_Options