Skip to content

Instantly share code, notes, and snippets.

View couleurm's full-sized avatar

Couleur couleurm

View GitHub Profile
@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
@jsecurity101
jsecurity101 / ProtectionChecks.ps1
Last active July 31, 2023 00:00
Powershell script that will pull whether a process or service is running as protected (PPL).
#Author: Jonthan Johnson (@jsecurity101)
if (-not ('ProtectedObjects.ProcessNativeMethods' -as [Type])) {
$TypeDef = @'
using System;
using System.Runtime.InteropServices;
namespace ProtectedObjects {
[Flags]
public enum ProcessAccess {
@agyild
agyild / NVScaler.glsl
Last active June 14, 2024 15:51
NVIDIA Image Scaling v1.0.2 for mpv
// The MIT License(MIT)
//
// Copyright(c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files(the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions :
@agyild
agyild / FSR.glsl
Last active June 16, 2024 21:31
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active June 9, 2024 15:08
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m

\u001b is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see ). If you wish to send colored text without using your bot you need to copy the character from the website.

@disco0
disco0 / PSReadLineMetaInfoKeyHandler.ps1
Created April 26, 2021 10:20 — forked from mklement0/PSReadLineMetaInfoKeyHandler.ps1
PowerShell sample code that demonstrates a PSReadLine key handler that display meta-information about the command being typed in real time.
<#
License: MIT
Author: Michael Klement <mklement0@gmail.com>
#>
$printableAsciiRangeChars = [char[]] (0x20..0x7f) # 0x7f seemingly acts like Backspace.
$printableAsciiRangeChars + 'Delete' + 'Enter' + 'Escape' | ForEach-Object {
@avengerx
avengerx / pdnreg.bat
Last active January 12, 2024 22:43
Add context menu 'Edit with Paint.NET' for supported file extensions (system-wide or per-user)
@ECHO OFF
setlocal EnableDelayedExpansion
set uninstall=no
set classkey=HKEY_CLASSES_ROOT
if [%1]==[uninstall] set uninstall=yes
net session > nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo Setting up for current user ^(run as Administrator for system-wide change^).
set classkey=HKEY_CURRENT_USER\Software\Classes
@Splaxi
Splaxi / download-latest-release.ps1
Last active May 31, 2024 23:15 — forked from MarkTiedemann/download-latest-release.ps1
Download latest GitHub release via Powershell
# Download latest dotnet/codeformatter release from github
$repo = "jgm/pandoc"
$filenamePattern = "*x86_64.zip"
$pathExtract = "C:\Tools\pandoc"
$innerDirectory = $true
$preRelease = $false
if ($preRelease) {
$releasesUri = "https://api.github.com/repos/$repo/releases"
@indented-automation
indented-automation / Get-CommandParameter.ps1
Last active October 26, 2022 21:34
PowerShell version 2 param block parser
function Get-CommandParameter {
# .SYNOPSIS
# A PowerShell version 2 compatible parameter block parser.
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, Position = 1, ValueFromPipelineByPropertyName = $true)]
[String]$Definition
)
@Espionage724
Espionage724 / 1-Info.txt
Last active June 13, 2024 07:46
Various Windows 10 Batch Files and Notes
Various Windows 10 Batch Files and Notes
- Notably for improving privacy on Windows 10
- Some performance tweaks