Skip to content

Instantly share code, notes, and snippets.

@jborean93
jborean93 / ConvertTo-UnattendedIso.ps1
Created June 17, 2021 02:26
Creates a copy of a Windows ISO to use for unattended Hyper-V installations
# Copyright: (c) 2021, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function ConvertTo-UnattendedIso {
<#
.SYNOPSIS
Converts a Windows ISO to one that doesn't require any keys to press on boot.
.PARAMETER Path
The Windows ISO to convert the UEFI loader to the no_prompt version.
@jborean93
jborean93 / Get-DomainController.ps1
Last active December 1, 2026 21:21
PowerShell wrapper for DsGetDcNameW
# Copyright: (c) 2021, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function Get-DomainController {
<#
.SYNOPSIS
Get the domain controller information.
.DESCRIPTION
Returns the name and additional information for the domain controller that matches the criteria specified.
@jborean93
jborean93 / Remove-FileEntry.ps1
Last active December 1, 2026 21:19
Removes a file/dir using direct Win32 calls
Add-Type -TypeDefinition @'
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Runtime.InteropServices;
namespace Kernel32
{
public enum FileInfoLevel
@jborean93
jborean93 / Appx-Server2025.ps1
Created November 10, 2024 21:40
Fix Appx in PSRemoting for Server 2025
# Server 2025 fails to run Get-AppxPackage and other DISM module commands in
# a PSRemoting (psrp) session as it has a dependency on some dll's not present
# in the GAC and only in the powershell.exe directory. As PSRP runs through
# wsmprovhost.exe, it fails to find those dlls. This hack will manually load
# the 4 required dlls into the GAC. This is a hack and should be removed in the
# future if MS fix their bug on 2025.
Add-Type -AssemblyName "System.EnterpriseServices"
$publish = [System.EnterpriseServices.Internal.Publish]::new()
@ashwch
ashwch / git-worktrees-zero-to-hero.md
Last active December 1, 2026 21:16
Git Worktrees: From Zero to Hero - A comprehensive guide to using Git worktrees with submodules
#!/usr/bin/env bash
# Safe AUR compromise indicator checker for the June 2026 Atomic Arch campaign.
# Read-only: does not install packages, does not run package build scripts, does not execute files found on disk.
set -Eeuo pipefail
IFS=$'
'
RED=$'\033[0;31m'; GREEN=$'\033[0;32m'; YELLOW=$'\033[1;33m'; CYAN=$'\033[0;36m'; NC=$'\033[0m'
PASS=0; WARN=0; FAIL=0; SKIP=0
USE_REMOTE=1
@Kidev
Kidev / check_aur_infected.sh
Created June 12, 2026 18:18
Check if any infected package is installed using Arch authoritative list
#!/usr/bin/env bash
# Pulls the live package list from the official Arch Linux HedgeDoc note.
LIST_URL="https://md.archlinux.org/s/SxbqukK6IA"
echo "Fetching infected package list..."
raw=$(curl -fsSL "$LIST_URL") || { echo "ERROR: failed to fetch $LIST_URL"; exit 1; }
# Extract lines that look like package names only (lowercase, digits, dots, plus, underscore, hyphen)
@nico
nico / blocks.txt
Last active December 1, 2026 21:06
unicode blocks for terminal UI drawing; lots new in unicode 13
General Punctuation
U+201x ‐ ‒ – — ― ‖ ‗ ‘ ’ ‚ ‛ “ ” „ ‟
U+202x † ‡ • ‣ ․ ‥ … ‧
U+203x ‰ ‱ ′ ″ ‴ ‵ ‶ ‷ ‸ ‹ › ※ ‼ ‽ ‾ ‿
U+204x ⁀ ⁁ ⁂ ⁃ ⁄ ⁅ ⁆ ⁇ ⁈ ⁉ ⁊ ⁋ ⁌ ⁍ ⁎ ⁏
U+205x ⁐ ⁑ ⁒ ⁓ ⁔ ⁕ ⁖ ⁗ ⁘ ⁙ ⁚ ⁛ ⁜ ⁝ ⁞
Arrows
U+219x ← ↑ → ↓ ↔ ↕ ↖ ↗ ↘ ↙ ↚ ↛ ↜ ↝ ↞ ↟
U+21Ax ↠ ↡ ↢ ↣ ↤ ↥ ↦ ↧ ↨ ↩ ↪ ↫ ↬ ↭ ↮ ↯
@hoyhoy
hoyhoy / brave.nix
Created February 24, 2026 07:18
Sane Defaults for Brave on NixOS
{ config, pkgs, ... }:
{
programs.chromium = {
extensions = [
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader
"mnjggcdmjocbbbhaepdhchncahnbgone" # sponsor block
"kceglpglilklghkgofolieongaolnaob" # cookie auto delete
];
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 1, 2026 21:03
Complete Recent Discord Quest

Caution

As of August 26th 2026, Discord has started suspending quest access of people caught automating quest completion.

Some users have received the following system message:

image

There isn't much I can do to make the script undetected, so use it at your own risk, as you WILL get flagged by doing so.

Complete Recent Discord Quest