Skip to content

Instantly share code, notes, and snippets.

@revoice1
revoice1 / Get-PokemonDamage.ps1
Last active February 13, 2023 20:54
Function that leverages PokéAPI to quickly retrieve damage relationships for any given Pokémon, from any given generation. Wrote this for myself and my son to use while running soullink nuzlockes from various generations. Super helpful when you don't have the damage tables for a given generation memorized.
function Get-PokemonDamage {
<#
.SYNOPSIS
Retrieve damage information of a Pokemon based on its type(s)
.DESCRIPTION
The `Get-PokemonDamage` function retrieves information about the damage a Pokemon takes from different types of attacks, based on its type(s).
It can be invoked using either the name of the Pokemon or its type(s).
By default, the function returns information about the most recent generation of the Pokemon, but it can also be configured to return information about past generations using the `Generation` parameter.
An extra info switch can also be specified to include more details about the Pokemon.
.PARAMETER Pokemon
@revoice1
revoice1 / MiSTer_Dev_Core_Build.ps1
Last active November 29, 2021 21:53
Code to pull repos and locally build/transfer development MiSTer cores
# Script to pull git repos for MiSTer cores, build locally, and transfer to MiSTer if online and registered in DNS
# Transfer to the MiSTer requires SMB to be enabled and working, with auth working
# i.e. before running the script connect to SMB ("\\mister\") and authenticate, saving the creds.
# Requires git to be installed locally in some form
# Requires a local install of Quartus 17.0 lite with Cyclone V support installed
# More info on Quartus https://fpgasoftware.intel.com/17.0/?edition=lite&platform=windows
$ProjectRoot = "Q:\Scripts" # Local path where you would like to store the repo
$quartus_sh = "C:\intelFPGA_lite\17.0\quartus\bin64\quartus_sh" # Default path to the quartus_sh file
$MiSTerDNSName = "MiSTer"
@revoice1
revoice1 / Convert_z7_cue_to_CHD.ps1
Last active October 1, 2023 17:33
Convert_z7_cue_to_CHD.ps1
#Requires -Version 5.1
[cmdletbinding()]
param(
[string]$SourcePath = "", # Path to 7z zipped disc images to be converted
[string]$DestinationPath = "", # Path where you would like the CHD's to go. One folder per game.
[string]$WorkingPath = "", # Path where files will be extracting temporarily for CHD creation, use fast disk if possible. Will be created in the running path if undefined
[string]$CHDMANPath = "", # Path to the CHDMAN executable, will be downloaded if this isn't defined or isn't correct
[switch]$CleanWorkingPath = $false, # Switch to automatically clean (delete contents) the working path dir if it is non-empty
[switch]$DisableMultithreading = $false, # Option to disable multithreading logic, for low thread systems or if you don't want CHD conversion to take most of your CPU %
[switch]$WritePlaylistFiles = $false # Write m3u files in the destination dir, for all CHDs present (not just new ones)