Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Discord MSG Center
// @version 0.3
// @author You
// @match https://discord.com/channels/@me
// @grant none
// ==/UserScript==
var queryByAttrNameStartsWith = (contextualSelector = '*', prefix = "") => {
const allSel = document.querySelectorAll(contextualSelector)
"""
import ctypes
MessageBox = ctypes.windll.user32.MessageBoxW
MessageBox(None, 'Hello', 'Window title', 0)
"""
########################################################
"""
import ctypes
# https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocess

Für die Änderungen ist die SystemPropertiesAdvanced.exe verantwortlich

  • Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\VisualFXSetting
  • Preset:
    • (0) Optimale Einstellung automatisch auswählen
    • (1) Für optimale Darstetllung anpassen
    • (2) Für optimale Leistung anpassen
    • (3) Benutzerdefiniert

Animation beim Minimieren und Maximieren von Fenstern

package main
import (
"log"
"os"
"strings"
"github.com/lxn/walk"
//lint:ignore ST1001 standard behavior lxn/walk
. "github.com/lxn/walk/declarative"
@spddl
spddl / main.go
Created November 19, 2021 15:37
"lava triangle" => F2
package main
// #include "stdafx.h"
// #include "Windows.h"
// int _tmain(int argc, _TCHAR* argv[])
// {
// HWND hwndWindowTarget;
// HWND hwndWindowNotepad = FindWindow(NULL, L"Untitled - Notepad");
// if (hwndWindowNotepad)
@spddl
spddl / 1.md
Created November 19, 2021 11:37
First steps in Go

requirements

glossary

Golang was created by 3 Google employees with the aim of being fast to write and fast to execute. Of course there are faster languages, but there are also more to be considered. In addition, Go is faster than many other languages https://getstream.io/blog/switched-python-go/

int64_t sub_1000023d0(HWND arg1, int64_t arg2, int64_t arg3)
void var_1d8
int64_t rax_1 = *data_100005110 ^ &var_1d8
SetCursor(*data_100005b98)
int32_t rbx = 1
int32_t var_1b8 = 1
int64_t rax_2 = SetupDiOpenDevRegKey(arg2, arg3, 1, 0, 1, 2)
if (rax_2 != -1)
HKEY var_188
$ErrorActionPreference = 'SilentlyContinue'
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
function generate_checkbox {
param(
[string]$checkboxText,
[string]$package,
[int]$newLocation
)
$checkbox = new-object System.Windows.Forms.checkbox
Function Test-RegistryValue ($regkey, $name) {
if (Get-ItemProperty -Path $regkey -Name $name -ErrorAction Ignore) {
$true
}
else {
$false
}
}
Get-ChildItem "HKLM:\SYSTEM\ControlSet001\Enum\USB" | ForEach-Object {
start /WAIT "" "Services Enable.cmd"
start /WAIT "" "Updates Enable.cmd"
rem cmd /c echo wuauclt /detectnow>>"%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\WinUpdate.bat"
rem cmd /c echo wuauclt /updatenow>>"%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\WinUpdate.bat"
rem cmd /c echo start /WAIT "" "Services Disable.cmd">>"%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\WinUpdate.bat"
rem cmd /c echo start /WAIT "" "Updates Disable.cmd">>"%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\WinUpdate.bat"
rem cmd /c echo del "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\WinUpdate.bat">>"%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\WinUpdate.bat"
cmd /c echo d3VhdWNsdCAvZGV0ZWN0bm93Cnd1YXVjbHQgL3VwZGF0ZW5vdwpzdGFydCAvV0FJVCAiIiAiU2VydmljZXMgRGlzYWJsZS5jbWQiCnN0YXJ0IC9XQUlUICIiICJVcGRhdGVzIERpc2FibGUuY21kIgpkZWwgIiVhcHBkYXRhJVxNaWNyb3NvZnRcV2luZG93c1xTdGFydCBNZW51XFByb2dyYW1zXFN0YXJ0dXBcV2luVXBkYXRlLmJhdCI=>>delme.txt