Skip to content

Instantly share code, notes, and snippets.

View nimaid's full-sized avatar

Ella Jameson nimaid

  • Tucson, AZ
View GitHub Profile
@nimaid
nimaid / penrose_triangle.txt
Last active April 19, 2025 06:31
ASCII art of the Penrose Triangle impossible shape.
__ Penrose __
/\ \ "Impossible" /\█\
/ \ \ Triangle /▒▒\█\
/ /\ \ \ /▒/\▒\█\
/ / /\ \ \ or /▒/ /\▒\█\
/ / /__\_\ \ /▒/ /__\▒\█\
/ / /________\ /▒/ /████████\
\/___________/ \/___________/
@nimaid
nimaid / nimaid_logo.txt
Last active April 19, 2025 07:04
My logo in ASCII art form, used in my releases.
__ __
/ \ / \
/ /\ \ / /\ \
/ \X\ \ \ \X\ \
/ /\ \X\ \ \ \X\ \
/ /X/ \X\ \ \ \X\ \
/ /X/ /\ \X\ \ \ \X\ \
\ \X\ \ \ \X\ \/ /X/ /
\ \X\ \ \ \X\ /X/ /
\ \X\ \ \ \X\ \/ /
@nimaid
nimaid / install_git_chocolately.bat
Created January 20, 2025 08:01
Install Git and Chocolatey on Windows without user interaction.
@echo off
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
C:\ProgramData\chocolatey\bin\choco install git -y
@nimaid
nimaid / ubuntu_server_minimal_desktop.bash
Created September 27, 2024 18:55
Turn a fresh Ubuntu Server install into a minimal OpenBox desktop environment.
#!/bin/bash
apt update
apt install -y xorg openbox tint2 obconf xcompmgr nemo nitrogen synaptic pluma lxter minal lxappearance firefox yad screen
@nimaid
nimaid / SwitchAutoBackup.bat
Last active May 2, 2024 13:16
WinSCP + Batch script to automatically backup various Nintendo Switch homebrew folders over FTP
@echo off
for %%x in (
"C:\Games\Switch\SwitchAutoBackup\JKSV\"
"C:\Games\Switch\SwitchAutoBackup\Album"
"C:\Games\Switch\SwitchAutoBackup\forwarders"
"C:\Games\Switch\SwitchAutoBackup\retroarch\roms"
"C:\Games\Switch\SwitchAutoBackup\retroarch\savefiles"
"C:\Games\Switch\SwitchAutoBackup\retroarch\system"
"C:\Games\Switch\SwitchAutoBackup\openrct2\home"
@nimaid
nimaid / SwitchMap.ahk
Last active April 22, 2024 01:15
A simple AutoHotKey (v1) script to map controller buttons unused by Switch emulators to external hotkeys.
DisplayHelpMsg()
Joy14:: ; Share button = F8 (Ryujinx screenshot)
TrayTip Screenshot Captured, A screenshot has been saved to the Ryujinx screenshots folder.
Send {F8 down}
KeyWait Joy2
Send {F8 up}
return
Joy13:: ; Home button = Alt + 3 (Shadowplay)
@nimaid
nimaid / blackout.ahk
Last active April 19, 2024 22:26
AutoHotKey (v1) scipt to add useful tools for blacking out the screen and hiding the cursor/border/taskbar
SystemCursor("Init")
GuiShown = false
DisplayHelpMsg()
#N:: ; Toggle blackout window = Win + N
WinGetTitle, title, A
If GuiShown = false
{
Gui, Color, black
@nimaid
nimaid / timestring.py
Last active December 24, 2023 16:05
A module to provide tools to format time-based objects into strings.
"""Provides tools to format time-based objects into strings."""
import datetime
from typing import Union
def split_seconds(seconds_in: Union[int, float]) -> dict[str, Union[int, float]]:
"""Split seconds into days, hours, minutes, and seconds, and return a dictionary with those values.
:param int seconds_in: The total number of seconds to split up.
:return: A dictionary with the split weeks ['w'], days ['d'], hours ['h'], minutes ['m'], and seconds ['s'].
@nimaid
nimaid / validate.py
Last active December 26, 2023 04:39
A very lightweight data validation class.
from dataclasses import dataclass
from typing import Any
class ValidationError(ValueError):
def __init__(self, message: str = None):
self.message = message
super().__init__(message)
@dataclass
class Validate:
@nimaid
nimaid / eta.py
Last active December 22, 2023 17:45
General purpose python classes for computing ETAs and formatting time strings.
import datetime
class TimeString:
@staticmethod
def split_seconds(seconds_in):
days, remainder = divmod(seconds_in, (60 ** 2) * 24)
hours, remainder = divmod(remainder, 60 ** 2)
minutes, seconds = divmod(remainder, 60)
return {