Skip to main content

6 posts tagged with "Utils"

View All Tags

How to mirror GDrive to local

· One min read

How to mirror data from GDrive to local

I tend to push larger repositories to GDrive as Github cannot easily host files above 100 MB. How would you mirror a GDrive folder and subfolders to your local drive and have an easy script to update these?

Below you find a Powershell script for Windows utilizing gdown!

Unreal Plugin Compile

· 2 min read

Tiny roboter on a piece of paper

Powershell script to recompile a plugin

This script will start the RunUAT.bat file filled with parameters to compile the plugin. Copy into a *.ps1 file, modify the parameter '$pathToEngine' and run in the director of the plugin.

You will need a working Visual Studio Installation to have the make file in your path.

Autohotkey - Mouse move

· One min read

Alpine landscape in Gaea

Simple script to drag the mouse to the left

Why would you need a script to drag the mouse with theleft button click slowly to the left?

I use this Autohotkey script to rotate a model in Gaea and screen capture it at the same time. So I start recording, fire the script below, place the mouse (script delays one second before starting), then the script clicks the left mosue button and slowly drags it to the left on the same y-axis - so slowly rotating the Gaea model.

A result is available here

ImageMagick Resize

· One min read

Resize Images with Image Magick

A small script to resize your images with ImageMagick and Powershell using multi threading. Easiest to install Imae Magick is using

Install ImageMagick with winget
winget install imagemagick

Make sure that the Image Magick folder is in your path.

The Powershell script has two parameters:

  • resizePercentage: How large should the resulting pictures be compared to the original?
  • suffix: This will be added to the image name

The script is using '*.jpg' as a filter - adjust if needed:

Resize images with ImageMagick
# Set variables
$resizePercentage = 50
$suffix = "_50"

$scriptBlock = {
param($fileName, $newFileName, $resizePercentage)
magick $fileName -resize $resizePercentage% $newFileName
}

# Get all .jpg files and start jobs
$jobs = @()
Get-ChildItem -Path . -Filter *.jpg | ForEach-Object {
$newFileName = $_.BaseName + $suffix + ".jpg"
$job = Start-Job -ScriptBlock $scriptBlock -ArgumentList $_.Name, $newFileName, $resizePercentage
$jobs += $job
Write-Host "Started conversion job for $($_.Name)" -ForegroundColor Cyan
}

# Wait for all jobs to complete
$jobs | Wait-Job

Install docusaurus on Windows

· 3 min read

Docusaurus on Windows

Install docusaurus on Windows

Docusaurus is an open source project for building, deploying and maintaining websites. You create a local copy of new web pages with Markdown and docusaurus will build a static website for deployment.

This article will detail the steps necessary to get it up and running on Windows 11.

tip

We will use Windows Powershell, the fnm version manager to install latest node.js environment and finally Docusaurus