Skip to content

Instantly share code, notes, and snippets.

View GhostTypes's full-sized avatar
🎯

GhostTypes

🎯
View GitHub Profile
@GhostTypes
GhostTypes / ModDownloader.ps1
Last active August 7, 2022 21:25
Batch download mc mods from Github (powershell 1-click)
$gh_token = ""
$gh_header = @{'authorization' = {$gh_token}}
$global:progressPreference = 'silentlyContinue'
$has_modf = $true
if ($gh_token) {
} else {
Write-Host -ForegroundColor Red "Github token missing!"
Write-Host -ForegroundColor Yellow "Create a key at https://github.com/settings/tokens"
Write-Host -ForegroundColor Yellow "then paste the key into the first line of this script (gh_token)"
@GhostTypes
GhostTypes / AddonToolkit.ps1
Last active August 7, 2022 18:49
Powershell tool to help with Meteor Addon development
$root = Get-Location
$gradle_build = Get-ChildItem $root\build.gradle
$gradle_props = Get-ChildItem $root\gradle.properties
$gradle_wrapper = Get-ChildItem $root\gradlew.bat
$addon_url = "https://github.com/MeteorDevelopment/meteor-addon-template/archive/refs/heads/main.zip"
$project_mode = $true
if (-not $gradle_build.Exists -or -not $gradle_props.Exists -or -not $gradle_wrapper.Exists) {
@GhostTypes
GhostTypes / MeteorSorter.ps1
Created August 8, 2022 17:29
Bulk sort meteor client jars (archival purposes)
$root = Join-Path $PWD "\meteor_archive"
$119 = Join-Path $root "\1.19.X"
$118 = Join-Path $root "\1.18.X"
$117 = Join-Path $root "\1.17.X"
mkdir -Path $root *> $null
mkdir -Path $119 *> $null
mkdir -Path $118 *> $null
mkdir -Path $117 *> $null
@GhostTypes
GhostTypes / GetMeteor.ps1
Created October 23, 2022 02:46
Build Meteor when the site is down
#Stop being lazy
function DownloadAndBuild() {
$zip_dl = "https://github.com/MeteorDevelopment/meteor-client/archive/refs/heads/master.zip"
$zip_out = Join-Path $PWD "meteor_src.zip"
$unzip_out = Join-Path $PWD "meteor_source"
try {
Write-Host -ForegroundColor Blue "Downloading meteor source from Github..."
Invoke-RestMethod -Uri $zip_dl -OutFile $zip_out
}
@GhostTypes
GhostTypes / AD5KlipperSetup.ps1
Created July 6, 2024 18:20
Windows script to set up a USB drive for installing Klipper firmware on the FlashForge Adventurer 5M/Pro
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName Microsoft.VisualBasic
function CopyFile {
param (
[Parameter(Mandatory=$true)]
[string]$Source,
[Parameter(Mandatory=$true)]
[string]$Dest
@GhostTypes
GhostTypes / R4Setup.ps1
Created July 6, 2024 18:22
Windows script to set up a micro sd for R4i-SDHC flashcarts. Installs YSMenu. Will update for more eventually, and have it auto download the multi-cart update zip.
$sdRoot = Read-Host -Prompt "Enter flashcart microsd drive letter (e.g., E:)"
$workDir = Get-Location
$cfRoot = Join-Path "$workDir" -ChildPath "RetroGameFan Multi Cart Update v7.06"
Write-Host $cfRoot
$r4iRoot = Join-Path "$cfRoot" -ChildPath "R4i-SDHC YSMenu"
$skinsRoot = Join-Path "$cfRoot" -ChildPath "YSMenu Skins"
$ttMenu = Join-Path "$r4iroot" -ChildPath "TTMenu"
$r4iDat = Join-Path "$r4iroot" -ChildPath "R4.dat"
@GhostTypes
GhostTypes / Auto GCN
Created February 23, 2025 22:29
Speed up video playback (1.5x) and automatically advance all slides
If you have a brain, passing the tests at the end is no issue, however **you are responsible** to know the things you should.
(function() {
// Set video speed whenever a new video loads
function setVideoSpeed() {
const videoPlayer = videojs.getPlayer('gcn-video-player');
if (videoPlayer) {
videoPlayer.off('ratechange');
videoPlayer.playbackRate(1.5);
videoPlayer.playbackRate = function(rate) {