Skip to content

Instantly share code, notes, and snippets.

@alastorid
alastorid / Assign-Dev.ps1
Last active August 19, 2023 15:04
DDA all the cards!
function Assign-Dev
{
param($vmname = "name", $num = $null)
$devs = Get-PnpDevice |? { ($_.Class -eq "Net") -or ($_.FriendlyName -eq "Network Controller") -or ($_.Class -eq "Display" -and $_.Manufacturer -match "NVIDIA|Advanced Micro Devices") }|select @(
@{l='num'; e={-1}},
@{l='name'; e={$_.FriendlyName}},
@{l='locationPath'; e={($_|Get-PnpDeviceProperty DEVPKEY_Device_LocationPaths).data[0]}},
@{l='instanceId'; e={$_.InstanceId}}
)
@alastorid
alastorid / paste it in cmd and you're all set
Created June 12, 2023 01:46
Flip the wheels of all mice in cmd(with admin approval)
set QueryString=reg query HKLM\SYSTEM\CurrentControlSet\Enum\HID /s /v FlipFlopWheel^^^|find ^"HKEY^"
echo Set all HIDs' FlipFlopWheel to 1
for /f "delims=" %i in ('%QueryString%') do @(
reg add "%i" /v FlipFlopWheel /t REG_DWORD /d 1 /f
)
rem Toggle the HID devices
for /f "tokens=6 delims=\" %i in ('%QueryString%') do @(
wmic path Win32_PnPEntity where "DeviceID like 'HID\\%%i%'" call Disable
@alastorid
alastorid / New MS Teams Profile.cmd
Last active June 7, 2023 07:08 — forked from DanielSmon/New MS Teams Profile.cmd
For running multiple MS Teams accounts side by side. Save this with the name of the MS Teams profile you wish to use. When launched, many folders plus junctions will be created in your user profile. And all running team.exe will be killed to be respawned. See https://danielsmon.com/2020/04/02/multiple-ms-teams-accounts-on-the-desktop/.
@ECHO OFF
echo don't try this at home
SET SHOULD_PAUSE=
REM kill them all !!!
wmic process where name="teams.exe" call terminate || taskkill /f /im teams.exe || echo o.O
REM Uses the file name as the profile name
call :teamsMC "%~n0"
call :teamsMC "default"
@alastorid
alastorid / gist:d46095b91b2c36cd95e520e058e468bf
Created April 13, 2023 10:27
oh I just drop a random script
# don't try this unless you know what it does
Get-IscsiVirtualDisk|Set-IscsiVirtualDisk -Enable 1
-r 30 -pix_fmt yuv420p -vcodec libx264 -bsf:v h264_mp4toannexb -preset slow -b:v 6000k
@alastorid
alastorid / xyz.md
Created March 4, 2023 02:12
stable diffusion x/y/z plot range step

0 - 100 step 1

0-100

0,1,2,3,4,5...,100

0 - 100 step 4

0-100 (+4)
---------------------------
Microsoft Visual Studio
---------------------------
An exception was thrown while initializing part "Microsoft.DriverKit.WdkTestPackage.PropertyPages.PackageDeploymentPropertyProvider".
---------------------------
OK
---------------------------
Solution:
- right click on toolbar
@alastorid
alastorid / wmic_cmds.txt
Last active December 29, 2022 07:17 — forked from xorrior/wmic_cmds.txt
Useful Wmic queries for host and domain enumeration
Host Enumeration:
--- OS Specifics ---
wmic os LIST Full (* To obtain the OS Name, use the "caption" property)
wmic computersystem LIST full
--- Anti-Virus ---
wmic /namespace:\\root\securitycenter2 path antivirusproduct
@alastorid
alastorid / HT
Created December 13, 2022 17:44
7z benchmark with 2*2696v4 + 2rx4 2dpc 32Gddr@2133, mem scrub off, adaptive paging policy, vt-d off
thread, comp, decomp
1t , 4.8, 6.4
1t ht, 4.7, 6.2
2t , 11.5, 12.3
2t ht, 11.3, 12.0
44t , 151.2, 202.7
44t ht, 113.1, 134.8
48t , 154.1, 184.4
48t ht, 118.6, 146.9
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AsyncAudioInputSPDIF3 spdif_async1; //xy=71,332.02589225769043
AudioFilterFIR fir1; //xy=98.00180435180664,514.0019092559814
AudioFilterFIR fir2; //xy=107.00192260742188,55.99998950958252