Skip to content

Instantly share code, notes, and snippets.

@milnak
milnak / Set-PuttyConfiguration.ps1
Created February 13, 2024 18:25
Set Putty session color themes and defaults
# Tango Dark theme
$colors = @{
# Default Foreground
'Colour0' = '187,187,187'
# Default Bold Foreground
'Colour1' = '255,255,255'
# Default Background
'Colour2' = '0,0,0'
# Dfeault Bold Background
'Colour3' = '85,85,85'
@milnak
milnak / update_plex.sh
Created February 1, 2024 00:06
Simple script to update plex
#!/bin/bash
set -e
echo 'Enter Plex update URL:'
echo 'e.g. https://plex.tv/downloads/latest/5?channel=16&build=linux-x86_64&distro=debian'
read -r url
wget --output-document=plex.deb --continue "${url}"
@milnak
milnak / JELOS Beginners Guide.md
Last active May 20, 2024 22:22
JELOS Beginners Guide

JELOS Beginner's Guide

Powkiddy X55 (RK3566) note

JELOS has stopped being developed. Powkiddy X55 owners should consider moving to ROCKNIX.

To turn your device off

IMPORTANT INFORMATION! NEVER TURN THE UNIT OFF or RESET! ALWAYS DO A SYSTEM SHUT DOWN (LIKE A PC!)

@milnak
milnak / indzip.cmd
Created January 17, 2024 01:46
Individually zip or 7z each file into a separate archive.
@ECHO OFF
SETLOCAL
ECHO.
SET TYPE=
SET FILE=%~2
IF /I "%~1" EQU "zip" SET TYPE=zip
IF /I "%~1" EQU "7z" SET TYPE=7z
IF "%TYPE%" EQU "" GOTO :USAGE
@milnak
milnak / content_favorites.lpl
Last active January 4, 2024 21:09
Master favorites list for "128GB ROM Pack" (on Archive) for GarlicOS. Garlic has a limit of 200 favorites, so many of these wont show.
{
"version": "1.5",
"items": [
{
"path": "/mnt/mmc/Roms/ARCADE/1942.zip"
},
{
"path": "/mnt/mmc/Roms/ARCADE/altbeast.zip"
},
{
@milnak
milnak / scoop-aliases.ps1
Last active March 13, 2024 04:58
My Scoop aliases #scoop
scoop alias rm list-full
scoop alias add list-full `
'scoop list | Select-Object Source,Name,Version | ForEach-Object { $app = ''{0}/{1}'' -f $_.Source, $_.Name; $info = scoop.ps1 info $app; [PSCustomObject]@{ ''App'' = $app; ''Version'' = $_.Version; ''Description'' = $info.Description; ''Website'' = $info.Website } }' `
'List installed apps along with description and website'
# use "scoop cat" instead
# scoop alias add show-manifest `
# '$bucket, $app = $args[0] -split ''/''; (Invoke-WebRequest(''https://raw.githubusercontent.com/ScoopInstaller/{0}/master/bucket/{1}.json'' -f $bucket, $app)).Content' `
# 'Show manifest for a given bucket/app'
@milnak
milnak / mp3-to-html.ps1
Last active March 13, 2024 05:18
Create MP3, FLAC files HTML (or pipeline) Report. Requires ffprobe.exe from ffmpeg package.
Param(
[string]$Path,
[switch]$HtmlOutput
)
function Format-Size {
param(
[Parameter(Mandatory)][double]$Bytes
)
switch ([math]::Max($Bytes, 0)) {
@milnak
milnak / stable_diffusion_install.md
Last active April 19, 2024 18:13
Stable Diffusion Install for Windows

Stable Diffusion Install

These instructions were written for Windows, but are easily adaptable to other platforms.

Note: Stable Diffusion requires PyTorch which only works with Python 3.10.

Install Prerequisites

Install Scoop then do:

@milnak
milnak / Verify-PinHP-Roms.ps1
Created November 22, 2023 23:08
Script to verify PinHP Roms and dependent BIOS and samples. #pinhp
# Script to verify PinHP Roms and dependent BIOS and samples.
param (
# Path to mame.exe
[string]$MamePath = '.',
# Path to rpi2jamma folder which contains "roms_advmame" and "samples_advmame".
[string]$RpiJammaPath = 'rpi2jamma'
)
function Verify-MameExe {
@milnak
milnak / Organize-PinHP-Roms.ps1
Last active November 22, 2023 18:19
PinHP Rom Organizer #pinhp
# Place this file in root of USB, i.e. parent of the "rpi2jamma" folder.
# Prerequisite:
# category.ini and version.ini from https://www.progettosnaps.net/index.php
# Place these files into "folders" folder off USB root.
# When run, this will:
# 1. Move unsupported ROMS to "roms_unused"
# 2. Organize roms into folders under "roms_advmame"
# 3. Add a ".title" file in each rom folder, describing the content.