Skip to content

Instantly share code, notes, and snippets.

@dafzor
dafzor / remove_startmenu_folders.ps1
Created October 8, 2022 14:22
Flattens start menu to remove all folders
$usr_sm_folder = "$($env:AppData)\Microsoft\Windows\Start Menu\Programs"
$sys_sm_folder = "$($env:ProgramData)\Microsoft\Windows\Start Menu\Programs"
$folder_exclusions = @(
'Administrative Tools',
'Startup',
'Steam'
)
function Remove-ShortcutFolder ($folder, $exclusions) {
@dafzor
dafzor / CookieMonster.noversioncheck.js
Last active May 5, 2020 23:29
CookieMonster.js without versioncheck
/**********
* Header *
**********/
CM = {};
CM.Backup = {};
CM.Cache = {};
@dafzor
dafzor / ProofOfConcept.cs
Created August 14, 2019 21:04
Proof of concept for launching World of Warcraft Classic
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace ProofOfConcept
{
class Program
[0]
__[4] Hat
____[28113] Fat Tuesday's Crown
____[28137] Festive scary snowman mask
____[28239] Knit slouch hat
______[28243] Knit slouch hat, mutlicolor bands
______[28241] Knit slouch hat, green bands
______[28240] Knit slouch hat, purple bands
______[28242] Knit slouch hat, grey bands
____[28269] Elfin cap
"""
Retroarch update existing cores script
created by /u/dafzor based on idea from /u/toeshred
version: 2017-09-04
"""
from os import listdir, remove
from os.path import isfile, join, abspath, expandvars
from urllib.request import urlretrieve
from tempfile import gettempdir
from zipfile import ZipFile
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Blizzard.URI.Battlenet]
@="URL:Blizzard Battle.net Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\Blizzard.URI.Battlenet\DefaultIcon]
@="\"C:\\Program Files (x86)\\Blizzard App\\Battle.net.exe\",0"
[HKEY_CLASSES_ROOT\Blizzard.URI.Battlenet\shell]
@dafzor
dafzor / rundivision.ps1
Created November 30, 2016 20:01
script to run the division and close uplay on exit
# powershell script to start thedivision and close uplay on exit by daf [ daf@madalien.com ]
# best run from PSRun.exe utility http://www.leporelo.eu/blog.aspx?id=run-scheduled-tasks-with-winform-gui-in-powershell
function Request-Close
{
param([string]$name)
# code borrowed from http://stackoverflow.com/questions/14436916/gracefully-closing-a-process-in-a-remote-session
$src = @'
using System;