Skip to content

Instantly share code, notes, and snippets.

@ril3y
ril3y / gridfinity
Created January 8, 2024 01:56
gridfinity drawer generator
import svgwrite
import argparse
# Constants
top_unit_size_mm = 42 # The top size of the grid unit in mm (for spacing)
base_unit_size_mm = 37.1 # The base size of the grid unit in mm (for drawing)
corner_radius_mm = 1.6 # Radius of the rounded corners in mm
mm_per_inch = 25.4 # Millimeters per inch
dpi = 96 # DPI (standard for many systems)
hairline_stroke_mm = .01 # Hairline stroke width in mm for laser cutting
@ril3y
ril3y / personal_profile.ps1
Last active May 9, 2025 14:48
This is my personal ps1 profile
$env:VIRTUAL_ENV_DISABLE_PROMPT = "1"
Set-Alias gcc "arm-none-eabi-gcc-13.3.1.exe"
& "C:\Users\riley\myvenv\Scripts\Activate.ps1"
try {
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression
} catch {
Write-Host "Failed to initialize Oh-My-Posh: $_" -ForegroundColor Red
}
@ril3y
ril3y / work_profile.ps1
Last active October 30, 2024 21:16
work_profile.ps1
function sha256 {
param (
[string]$FilePath
)
# Resolve the full path if the path is relative
$resolvedPath = Resolve-Path $FilePath -ErrorAction Stop
# Check if the file exists
if (-not (Test-Path $resolvedPath)) {
@ril3y
ril3y / installer.ps1
Last active October 31, 2024 02:16
installer.ps1
# Step 1: Check if Python is installed
function Ensure-Python {
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
Write-Host "Python not found. Installing Python..." -ForegroundColor Yellow
$pythonInstaller = "$env:TEMP\python-installer.exe"
Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.x.x/python-3.x.x-amd64.exe" -OutFile $pythonInstaller
Start-Process -FilePath $pythonInstaller -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1' -Wait
Remove-Item $pythonInstaller
} else {
Write-Host "Python is already installed." -ForegroundColor Green
@ril3y
ril3y / launch_firecontrol.ps1
Created December 26, 2024 22:35
A powershell script that will launch firecontrol with java not the provided exe. This is to possible make an agent to extend firecontrol
function Launch-FireControl {
# Define paths
$javaPath = "C:\Users\riley\AppData\Local\FireControl\runtime\bin\java.exe"
$appDir = "C:\Users\riley\AppData\Local\FireControl\app"
$configFile = "$appDir\FireControl.cfg"
# Check if configuration file exists
if (-Not (Test-Path $configFile)) {