Skip to content

Instantly share code, notes, and snippets.

View idiotandrobot's full-sized avatar

Michael Phillips idiotandrobot

View GitHub Profile
# Script Paths
$env:Path -split ";"
# Module Paths
$env:PSModulePath -split ";"
function Get-DownloadFolderPath() {
$SHGetKnownFolderPathSignature = @'
[DllImport("shell32.dll", CharSet = CharSet.Unicode)]
public extern static int SHGetKnownFolderPath(
ref Guid folderId,
uint flags,
IntPtr token,
out IntPtr lpszProfilePath);
'@
$files = Get-Item * -Stream Zone.Identifier -ErrorAction SilentlyContinue | ForEach-Object {$_.Filename}
Unblock-File $files
Get-Help Unblock-File -Parameter * | Where-Object pipelineinput -Like 'true*'
function Clean-Solution {
param ([string]$path)
Write-Host "Removing bin from: $path"
Get-ChildItem $path -include bin -recurse | Remove-Item
Write-Host "Removing obj from: $path"
Get-ChildItem $path -include obj -recurse | Remove-Item
}
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<clear />
<add key="repositoryPath" value="[PackagesPath]" />
<add key="globalPackagesFolder" value="[PackagesPath]" />
</config>
</configuration>
from datetime import datetime
import os
import sqlite3
import time
import aranet4
NUM_RETRIES = 10
DEVICES = {
'bedroom': 'xx:xx:xx:xx:xx:xx'
REG ADD HKLM\SYSTEM\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 1
powershell.exe iex \"& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI\"
@idiotandrobot
idiotandrobot / rc.xml
Created December 16, 2023 14:23
Openbox window snapping
<!--
via https://pastebin.com/NBkccE7B
Add this to your openbox rc.xml
inside <keyboard></keyboard>
+-------+-------+ +---------------+
| ALT+q | ALT+e | | ALT+w |
+-------+-------+ +---------------+
| ALT+z | ALT+c | | ALT+x |
+-------+-------+ +---------------+