Skip to content

Instantly share code, notes, and snippets.

View dieaikhlayel's full-sized avatar
😎
I'm Good

Diea dieaikhlayel

😎
I'm Good
View GitHub Profile
@dieaikhlayel
dieaikhlayel / algorithms.py
Created November 9, 2025 12:30
Python Gist: Over-Engineered Rubik's Cube Simulator & Solver – A Labyrinth of Algorithms 🧩
"""
Algorithms module: Hardcoded CFOP algs as move sequences.
Complex: Grouped by case, with recognizers.
"""
from typing import Dict, List, Tuple
from constants import PHASES
# OLL cases (example: 2 from 57)
OLL_ALGS: Dict[str, List[str]] = {
@dieaikhlayel
dieaikhlayel / App.vue
Last active November 9, 2025 12:36
Vue.js Gist: Enterprise-Grade "VueVerse" Dashboard – A 100+ File Monolith (Skeleton Edition)
<template>
<div id="app">
<router-view />
</div>
</template>
<script setup>
// Global composables or stores can go here
import { useUniverseStore } from '@/store/universeModule.js'
const store = useUniverseStore()
@dieaikhlayel
dieaikhlayel / ai_snake.py
Last active November 9, 2025 12:38
Python Gist: Over-Engineered Snake Game – A Labyrinth of Code 🐍
"""
AISnake: Dumb-but-fun AI player using greedy lookahead.
Extends Snake with decision-making.
"""
from typing import Optional
import heapq # For A* lite
from snake import Snake
from vector import Vector2D
from constants import AI_DIFFICULTY
@dieaikhlayel
dieaikhlayel / inventory.rb
Last active November 9, 2025 12:41
Ruby Gist: Fantasy Shop Inventory Manager – A CLI Adventure
# Inventory class: Manages a collection of Items (add, remove, search, list).
require_relative 'item'
class Inventory
def initialize
@items = []
end
def add_item(name, price, quantity = 0)
item = Item.new(name, price, quantity)
@dieaikhlayel
dieaikhlayel / game.py
Last active November 9, 2025 12:43
Python Gist: Multi-File "Quote Quest" – A Motivational Quiz Adventure
"""
Game module: Handles the 'Quote Quest' quiz logic.
Uses a provided quote/author to run a simple guess-the-author game.
"""
def play_quiz(quote, author):
"""
Runs the quiz: Shows quote, lets user guess author from options.
Returns True if won, False if lost.
"""
@dieaikhlayel
dieaikhlayel / motivational-advice.html
Last active November 9, 2025 12:44
HTML/CSS/JS Gist: Motivational Advice Carousel
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Motivational Advice from Legends</title>
<style>
body {
font-family: 'Georgia', serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
@dieaikhlayel
dieaikhlayel / tic-tac-toe.ts
Last active November 9, 2025 12:45
TypeScript Gist: Simple Tic-Tac-Toe (X & O) Game
/**
* Tic-Tac-Toe Game in TypeScript
* X (Player 1) vs O (Player 2) on a 3x3 grid.
* Console-based: Enter row/col (0-2) for moves.
* Detects wins, draws, and invalid inputs.
*/
type Player = 'X' | 'O';
type Cell = Player | null;
type Board = Cell[][];
@dieaikhlayel
dieaikhlayel / klein_bottle_loop.py
Last active November 9, 2025 12:46
Python Code for a "Klein Bottle" Infinite Loop
import itertools
import time # For a subtle delay to simulate "immersion"
def klein_bottle_loop():
"""
An infinite generator loop inspired by the Klein bottle:
Yield messages in an endless cycle, but consume with a stop condition.
Twist out when you're ready—no harsh breaks!
"""
messages = [