Skip to content

Instantly share code, notes, and snippets.

@milnak
milnak / MuseScore-To-Pdf.ps1
Created April 3, 2025 23:30
Batch convert folder of MuseScore MSCZ files to PDF
Get-ChildItem -File -Filter '*.mscz' | ForEach-Object {
"Converting $($_.BaseName) ..."
$tempfile = 'temp.json'
'* Extract JSON'
Start-Process `
-Wait `
-WorkingDirectory (Get-Location).Path `
-FilePath """$env:ProgramFiles\MuseScore 4\bin\MuseScore4.exe""" `
@milnak
milnak / dump-scoop-aliases.ps1
Last active April 2, 2025 00:19
Scoop Aliases
Get-ChildItem -LiteralPath "${env:HOMEDRIVE}${env:HOMEPATH}/scoop/shims" -File -Recurse -Filter 'scoop-*.ps1' `
| Select-Object `
@{ Name = 'Name'; Expression = { $_.BaseName.SubString(6) } },
@{ Name = 'Command'; Expression = { (Get-Content $_.FullName | Select-String -Pattern '^# Summary: (.*)' -NotMatch) -replace '''','''''' } },
@{ Name = 'Summary'; Expression = { (Get-Content $_.FullName | Select-String -Pattern '^# Summary: (.*)').Matches[0].Groups[1] }} `
| ForEach-Object {
"scoop alias add '$($_.Name)' '$($_.Command)' '$($_.Summary)'"
}
@milnak
milnak / mortgage-calc.html
Last active March 28, 2025 22:07
Mortgage calculator written in HTML and JavaScript
<html>
<head>
<title>JavaScript Mortgage Calc</title>
</head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f9;
@milnak
milnak / SysInfo.vbs
Created March 18, 2025 18:21
SysInfo - Displays system info using WMI
'
' File: SysInfo.vbs
' Created: May 29, 2002
' Version: 1.1
'
' Function: Displays system information using WMI
' Author: Jeff Miller
'
' History:
' 1.0 May 29, 2002 - initial revision
@milnak
milnak / Behringer TD-3 Tutorial.md
Last active March 19, 2025 18:38
Behringer TD-3 Tutorial

Behringer TD-3 Tutorial

System overview

  • 4 Pattern Groups (PG): I, II, III, iV
  • 16 Patterns (PA) per PG, eight "A" patterns and eight "B" patterns.
  • Each PA can have up to 16 steps. Default step is a 16th note.
  • 7 Tracks (TR)
    • PG I consists TR 1, 2
  • PG II consists TR 3, 4
@milnak
milnak / manager-cheat-sheet.md
Last active March 15, 2025 20:40
The Manager's Cheat Sheet: 101 Common-Sense Rules for Leaders

The Manager's Cheat Sheet: 101 Common-Sense Rules for Leaders

Boost your management skills by getting back to the basics — here are some common sense tips for leading an effective team.

By Inside CRM Editors

Management is all about connecting with the people on your team. So how do you effectively manage a team? With common knowledge, of course. These are a few back-to-basics rules that will help you develop management skills that really matter.

Body Language

@milnak
milnak / doublecmd-backup.ps1
Last active February 26, 2025 20:06
Backup Double Commander settings folder using 7z
Param(
[string]$SourcePath = '~\scoop\persist\doublecmd',
[string]$DestinationPath = (Resolve-Path '~').Path,
[string]$Filename = 'DoubleCmd Backup {0}' -f (Get-Date -Format '(yyyy-MM-dd)')
)
# Ensure 7z.exe exists
Get-Command '7z.exe' -CommandType Application -ErrorAction Stop | Out-Null
$archiveName = '{0}.7z' -f (Join-Path -Path $DestinationPath -ChildPath $Filename)
@milnak
milnak / how-to-digitize-recordings.md
Last active March 3, 2025 02:36
How to Digitize Recordings using Audacity

How to Digitize Recordings using Audacity

Adapted parts from Splitting a recording into separate tracks.

Set up connections

If using a record player, you'll need a phono preamp to increase the level from the record player to line level. Better still, use a record player that has RCA line out or USB out. The Audio-Technica LP-120XUSB has both. If the record player has USB out, you can connect that directly to your computer, and skip to the next section.

If using a tape deck, or a record player with RCA line out, you'll need to connect RCA cables to a DAC (digital-to-analog converter). For example, I use Livewire Essential Interconnect Dual Cable RCA Male to 1/4" TS Male, plugging the RCA Male to the "Line Out (Play)" jacks on my tape deck, and the 1/

@milnak
milnak / dump-sqlite.ps1
Created February 17, 2025 23:39
Dump Sqlite Table using PowerShell
$SqliteAssembly = Resolve-Path -LiteralPath '~\scoop\apps\scoop\current\supporting\sqlite\System.Data.SQLite.dll'
$DbPath = Resolve-Path -LiteralPath '~\AppData\Roaming\Code\User\globalStorage\state.vscdb'
if (!('System.Data.SQLite.SQLiteConnection' -as [Type])) {
Add-Type -Path $SqliteAssembly
}
$connection = New-Object -TypeName 'Data.SQLite.SQLiteConnection'
$connection.ConnectionString = "Data Source=$DbPath"
$connection.Open()
$command = $connection.CreateCommand()
@milnak
milnak / HyperV-VM-Creator.ps1
Last active February 12, 2025 04:01
Create a Hyper-V VM from an ISO.
<#
.SYNOPSIS
Create a Hyper-V VM from an ISO.
.DESCRIPTION
Create a Hyper-V VM from an ISO.
.PARAMETER VMName
VM Name