Skip to content

Instantly share code, notes, and snippets.

View PeriodGamingYT's full-sized avatar

_arabica PeriodGamingYT

View GitHub Profile
import javafx.application.Application;
import javafx.application.Platform;
import javafx.stage.Stage;
import javafx.scene.control.Button;
import javafx.scene.Scene;
import javafx.scene.robot.Robot;
import javafx.geometry.Bounds;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
@ECHO OFF
CLS
SETLOCAL ENABLEDELAYEDEXPANSION
REM Based off of the old one but adapted to be inside of a Google Drive folder that holds an IntelliJ project
REM (Batch file intended to be placed inside of the root of said IntelliJ project). As a side note, every
REM single time I use an IDE, the more I hate IDEs and the more I hate humanity. I was originally intending
REM only do an IntelliJ project but importing Java libraries from IntelliJ project on a Google Drive folder
REM makes it take the absolute path. That is an issue since I make a shortcut to a shared drive, which means
REM that the shared pin hash will be different for different users. IntelliJ wouldn't provide any way to make
import java.io.*;
import java.net.*;
import java.util.*;
import java.nio.charset.*;
import java.util.function.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
@PeriodGamingYT
PeriodGamingYT / PageLinkedList.md
Last active May 2, 2026 01:33
This outlines a data structure that I frequently make use of in my projects.

P.S.: Attempting to copy this code all together will not compile, since there are plentiful errors in this. This code is only meant to demonstrate what the code will look like. As of writing this, I am working on making a single header library for PageLinkedList.

The Github URL for correct PageLinkedList is: PageLinkedList.

As a preface, consider these two functions and one typedef are defined as below when reading this gist (The function implementations, although Windows Specific, are easily translatable into POSIX):

typedef uint8_t Bool;

// NOTE: This code assumes that the memory given back by this function is zeroed.
// NOTE: i don't need to do this, i'm just bored
import java.util.Random;
public class EightQueens {
public Random random;
// NOTE: applies for rows and columns
public final int queensSize = 8;
public boolean isQueenValid(
@PeriodGamingYT
PeriodGamingYT / run.bat
Last active April 21, 2026 00:24
Java Batch Runner
@ECHO OFF
REM Default parameters
SET DefaultClass=Main
SET DefaultJavaPath=C:\Program Files\Java\jdk-21\bin
SET DefaultRunJar=1
SET DefaultShouldCompile=1
REM Flag parameters
SET Files=
@PeriodGamingYT
PeriodGamingYT / Battleship.java
Last active February 2, 2026 01:55
Java is kinda lame but i thought this was cool
import java.util.Scanner;
import java.util.Random;
import java.util.function.BooleanSupplier;
public class Battleship {
public static class Point {
public int x, y;
public Point() {
x = 0;