Skip to content

Instantly share code, notes, and snippets.

View CrookedJ's full-sized avatar
💭
idk shit about fuck

CrookedJ CrookedJ

💭
idk shit about fuck
  • US
View GitHub Profile
@okineadev
okineadev / commit-message-guidelines.md
Last active July 26, 2025 19:48
🤖 Copilot commit messages instructions for VS Code

Paste it to settings.json:

"github.copilot.chat.commitMessageGeneration.instructions": [
  {
    "text": "Follow the Conventional Commits format strictly for commit messages. Use the structure below:\n\n```\n<type>[optional scope]: <gitmoji> <description>\n\n[optional body]\n```\n\nGuidelines:\n\n1. **Type and Scope**: Choose an appropriate type (e.g., `feat`, `fix`) and optional scope to describe the affected module or feature.\n\n2. **Gitmoji**: Include a relevant `gitmoji` that best represents the nature of the change.\n\n3. **Description**: Write a concise, informative description in the header; use backticks if referencing code or specific terms.\n\n4. **Body**: For additional details, use a well-structured body section:\n   - Use bullet points (`*`) for clarity.\n   - Clearly describe the motivation, context, or technical details behind the change, if applicable.\n\nCommit messages should be clear, informative, and professional, aiding readability and project tracking."
  }
]
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Management.Automation;
using System.Security;
using System.Text;
using Microsoft.Win32;
function Get-MyDisk {
[CmdletBinding()]
param(
[Alias('DeviceId')]
[int] $Number,
[string] $FriendlyName
)
if (-Not ('Pinvoke.Win32Utils' -as [type])) {
Add-Type -TypeDefinition @'
@trackd
trackd / protocolhandler-clipboard.ps1
Created December 28, 2023 01:50
prototype something something
function Add-ClipboardProtocolHandler {
# clipboard://
$custom = Get-Command "$env:temp\customclip.exe" -CommandType Application -ErrorAction 'Stop'
$uri = 'clipboard'
if (!(Test-Path "HKCU:\Software\Classes\$uri")) {
New-Item "HKCU:\Software\Classes\$uri"
}
Set-ItemProperty "HKCU:\Software\Classes\$uri" '(Default)' "URL:$uri Protocol"
Set-ItemProperty "HKCU:\Software\Classes\$uri" 'URL Protocol' ''
if (!(Test-Path "HKCU:\Software\Classes\$uri\shell")) {
@jborean93
jborean93 / NoGui.ps1
Last active July 1, 2025 13:58
Generates an exe called NoGui.exe that can spawn a hidden windows
<#
NOTE: Must be run in Windows PowerShell (5.1), PowerShell (7+) cannot create standalone exes.
This is designed to create a simple exe that can be used to spawn any console
application with a hidden Window. As NoGui.exe is a GUI executable it won't
spawn with an associated console window and can be used to then create a new
process with a hidden console window with the arguments it was created with.
By default, NoGui will spawn the child process with same stdio handles as
@santisq
santisq / uactranslation.ps1
Last active February 28, 2025 17:32
Translates userAccountControl Value to UserAccountControl Flag
[Flags()] enum UAC {
SCRIPT = 1
ACCOUNTDISABLE = 2
HOMEDIR_REQUIRED = 8
LOCKOUT = 16
PASSWD_NOTREQD = 32
PASSWD_CANT_CHANGE = 64
ENCRYPTED_TEXT_PWD_ALLOWED = 128
TEMP_DUPLICATE_ACCOUNT = 256
NORMAL_ACCOUNT = 512
@RafaelUngar
RafaelUngar / ACCio.dat
Last active February 26, 2025 18:40
🧙🐑 AutoControl for Colonist.io (ACCio): play Colonist.io using your keyboard! Setup instructions in comments below.
{"customEntities":{"script":[["1",{"name":"wall.js","value":{"mdTime":1641400238352,"srcCode":"await ACCio(_ => {\n socketGameSend.buildCityWall();\n selectNextAfterDelay();\n});"}}],["2",{"name":"setup.js","value":{"mdTime":1656815986599,"srcCode":" try {\n return ACCio(_ => console.log(\"ACCio is already enabled! Try refreshing if you're having trouble.\"));\n }\n catch (e) { console.error(e) }\n\n try {\n await ACtl.runInPageCtx('https://cdn.jsdelivr.net/gh/CoeJoder/[email protected]/waitForKeyElements.js');\n }\n catch {\n return ACtl.runInPageCtx(_ => console.error('ACCio failed to load all required libraries.'));\n }\n\n ACCio = new Proxy(ACtl.runInPageCtx, {\n apply: (target, thisArg, argumentsList) => {\n if (['INPUT', 'TEXTAREA'].includes(document.activeElement.tagName)) {\n return;\n }\n\n try { return target(...argumentsList); }\n catch (e) { console.error(e) }\n }\n });\n\n await ACtl.runInPageCtx(_ => waitForKeyElements('canvas[style*
@vexx32
vexx32 / PowershellLoopBehavior.md
Last active November 15, 2024 18:59 — forked from JustinGrote/PowershellLoopBehavior.md
Reference Table for Loop Behavior in Powershell
Loop Return Continue Break
Normal Expectation Exit Scope Next Item Exit Loop
.foreach{} Next Item Break Scopes / Next Item of Parent Loop Break Scopes / Exit Parent Loop
foreach ($y in $x) Exit Scope Next Item Exit Loop
for ($i;$i -lt 5;$i++) Exit Scope Next Item Exit Loop
Foreach-Object -InputObject @() Next Item Break Scopes / Next Item of Parent Loop Break Scopes / Exit Parent Loop
Switch Exit Scope Next Item Exit Switch
While
@fnky
fnky / ANSI.md
Last active July 27, 2025 06:57
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27