Skip to content

Instantly share code, notes, and snippets.

MAILTO=""
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * command to be executed
# * * * * * command --arg1 --arg2 file1 file2 2>&1
# Visual FoxPro 9.0 SP2 Hotfix (KB968409) Installation Script
# Assumes script is in the same directory as VFP90SP2-KB968409-ENU.exe
# Stop if an error occurs
$ErrorActionPreference = "Stop"
# Ensure script is run as Administrator
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
throw "This script must be run as Administrator!"
}
@mindfulvector
mindfulvector / install-certs.sh
Created September 25, 2024 23:29
lego --run-hook script to install into Apache2
#!/bin/bash
# Check if all required environment variables are set
required_vars=("LEGO_ACCOUNT_EMAIL" "LEGO_CERT_DOMAIN" "LEGO_CERT_PATH" "LEGO_CERT_KEY_PATH")
for var in "${required_vars[@]}"; do
if [ -z "${!var}" ]; then
echo "Error: $var is not set"
exit 1
fi
done
@mindfulvector
mindfulvector / README.md
Last active September 2, 2024 06:53
organize_zx_spectrum

ZX Spectrum Game Organizer

This batch script is designed to automatically organize a collection of ZX Spectrum game files and related media. It sorts various file types into appropriate directories, making it easier to manage large collections of ZX Spectrum content.

Features

  • Organizes files into categories: games, pokes, images, documents, audio, and miscellaneous
  • Handles common ZX Spectrum file formats (.tap, .tzx, .z80, .sna, .rzx, .dsk) + poke files (.pok)
  • Sorts image files (.jpg, .png, .gif, .bmp)
  • Manages document files (.txt, .pdf)
@mindfulvector
mindfulvector / GhostSON.md
Last active August 29, 2024 20:46
GhostSON where'd you find this madness ?

GhostSON Specification

Overview

GhostSON is a lightweight, human-readable data serialization format that combines features of BSON (Binary JSON) and TAG/LENGTH/DATA techniques. It uses Unicode 8 characters, including selected "ghost characters" that are printable but lack semantic meaning in any language, to keep the format compact yet readable.

Basic Structure

Each GhostSON document consists of a series of elements. Each element has the following structure:

/*
Copyright 2024. Isaac Raway and Stone Orb Software.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
@mindfulvector
mindfulvector / Notes.cs
Last active May 2, 2024 21:30
A notebook written in Unity IMGUI / C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
public class Notes : MonoBehaviour
{
public string directoryPath = "C:\\Users\\topfr\\OneDrive\\Documents\\Notes";
private string configFileName = "config.ini";
@mindfulvector
mindfulvector / palworld.bat
Created February 12, 2024 17:07
palworld server startup script
REM This assumes Steam is installed to C:\Bin
REM It also assumes S3Express is installed to C:\Bin\S3Express
REM You need to launch S3Express and run saveauth once to enter your authentication.
REM If you use non-AWS S3 compatible service, configure the endpoint as well in S3Express.
REM
REM The script also assumes that scoop is installed in your user directory
REM and that you have run `scoop install 7zip`
REM
REM Create this directory for backups to work:
REM C:\Backup\palworld\
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body, html {
margin: 0;
overflow: hidden;