--- Projects — Matt Twells

$ cd projects

$ cat memory_dungeon.txt

An interactive demo of heap memory, a stack frame and a disassembler to help teach people about memory.

demo@memorydungeon:~
➜  memorydungeon git:(main) ./memory_dungeon 
=== Memory Dungeon ===
Choose your quest, brave adventurer:
1. Heap Hallway (Many Rooms, Which One is Next?)
2. Stack Playground (Tower of Frames)
3. Disassembler (Magic Scrolls)
0. Exit
> 2
You chose Stack Playground!
Welcome to Stack Playground!  It's Bloodsport rules: Two frames enter, one frame leaves...

If you want to see your typed characters, type less than 16 characters. If you want to see the overflow, type more than 16 characters.

Enter a string to add to the stack:

hellothisisdog
You entered: hellothisisdog
=== The Tower of Frames ===
| Return Address | SAFE! 
  ↳ This is where the CPU expects to resume execution after this function.
| Saved Frame Pointer | SAFE! 
  ↳ Keeps track of where the last stack frame began.
| buf [16]  | hellothisisdog..
=======================
➜  memorydungeon git:(main) ./memory_dungeon 
=== Memory Dungeon ===
Choose your quest, brave adventurer:
1. Heap Hallway (Many Rooms, Which One is Next?)
2. Stack Playground (Tower of Frames)
3. Disassembler (Magic Scrolls)
0. Exit
> 2
You chose Stack Playground!
Welcome to Stack Playground!  It's Bloodsport rules: Two frames enter, one frame leaves...

If you want to see your typed characters, type less than 16 characters. If you want to see the overflow, type more than 16 characters.

Enter a string to add to the stack:

NOTHISISPATRICKSTARWHOISTHIS
You entered: NOTHISISPATRICKSTARWHOISTHIS
=== The Tower of Frames ===
| Return Address | BUF.OVERFLOW! 
  ↳ The CPU will try to return to this address.
  ↳ Since it's overwritten with your input, the program will crash.
| Saved Frame Pointer | BUF.OVERFLOW! 
  ↳ This normally links one stack frame to the previous.
  ↳ Overwriting it corrupts the call stack.
| buf [16]  | NOTHISISPATRICKS
=======================
[1]    11495 abort      ./memory_dungeon
➜  memorydungeon git:(main) 

        
➜ View on GitHub

$ cat wizard's_shell.txt

A D&D-inspired custom shell written entirely in C with spell-based commands.

demo@wizard'sshell:~
/Users/matthewtwells/Documents/C-Practice/wizardshell
🔆 >darkvision
You can see through the darkness and discover hidden contents! 🔍

build        include        Makefile    README.md    src    tempdir
🔆 >teleportcircle tempdir
Energy courses around your feet, and you are teleported to tempdir! 

Welcome to tempdir! 🌟

🔆 >viciousmockery
🎭 A jeering voice from the ether says: HTML is a programming language just like Dr. Pepper is a physician.

🔆 >counterspell
The spell is broken! Exiting...

        
➜ View on GitHub

$ cat c&d&d.txt

Terminal RPG based on D&D 5E rules, teaching pointers and memory management.

demo@c&d&d:~
Party has been saved to party.txt
=== PARTY SUMMARY - Our intrepid adventurers === 

1. Tav - NE Fighter (HP: 40, AC: 15)
STR: 18 (Mod: 4), DEX: 14 (Mod: 2), CON: 16 (Mod: 3)
INT: 12 (Mod: 1), WIS: 13 (Mod: 1), CHA: 10 (Mod: 0)
--------------------------------

2. Gale - NG Wizard (HP: 30, AC: 14)
STR: 10 (Mod: 0), DEX: 12 (Mod: 1), CON: 14 (Mod: 2)
INT: 18 (Mod: 4), WIS: 16 (Mod: 3), CHA: 18 (Mod: 4)
--------------------------------

3. Jaheira - LG Ranger (HP: 40, AC: 16)
STR: 16 (Mod: 3), DEX: 16 (Mod: 3), CON: 16 (Mod: 3)
INT: 14 (Mod: 2), WIS: 18 (Mod: 4), CHA: 14 (Mod: 2)
--------------------------------

4. Shadowheart - CE Cleric (HP: 30, AC: 16)
STR: 16 (Mod: 3), DEX: 18 (Mod: 4), CON: 14 (Mod: 2)
INT: 12 (Mod: 1), WIS: 18 (Mod: 4), CHA: 16 (Mod: 3)
--------------------------------

--------------------------------

=== An Encounter Begins! === 

An angry Giant Rat appears! (HP: 10, AC: 10, Att.Bon: 2, Dmg.Die: D4, Dmg.Bon: 0)

Swords in hand, spells at the ready, the party is ready to fight! 


=== Gale's Turn === 
Gale misses the Giant Rat! 

--------------------------------
=== Giant Rat's turn === 
Giant Rat hits Gale for 6 damage! (Gale's HP is now: 24) 

--------------------------------
=== Tav's Turn === 
Tav misses the Giant Rat! 

--------------------------------
=== Giant Rat's turn === 
Giant Rat misses their attack on Tav! 

--------------------------------
=== Tav's Turn === 
Tav hits the Giant Rat for 5 damage! (Ememy HP is now: 5) 

--------------------------------
=== Giant Rat's turn === 
Giant Rat misses their attack on Tav! 

--------------------------------
=== Shadowheart's Turn === 
Shadowheart hits the Giant Rat for 11 damage! (Ememy HP is now: -6) 

--------------------------------
Shadowheart whispers: "Omae wa mou shindeiru..."
Giant Rat says back: NANI?!?
Giant Rat has been defeated! 

        
➜ View on GitHub

$ cat task_manager.py.txt

Python CLI task tracker with JSON persistence.

demo@task_manager.py:~
Enter your choice (1-5): 1

Your Tasks For Today: 

1. [ ] Feed Kimchi the Cat
2. [ ] Take the Trash Out

What would you like to do today?
1. List all tasks
2. Add a task
3. Mark a task as complete
4. Delete a task
5. Exit

Enter your choice (1-5): 3

Your Tasks For Today: 

1. [ ] Feed Kimchi the Cat
2. [ ] Take the Trash Out


Please input the number of the task you want to mark complete: 1
Task Feed Kimchi the Cat is completed!

What would you like to do today?
1. List all tasks
2. Add a task
3. Mark a task as complete
4. Delete a task
5. Exit

Enter your choice (1-5): 1

Your Tasks For Today: 

1. [✓] Feed Kimchi the Cat
2. [ ] Take the Trash Out

What would you like to do today?
1. List all tasks
2. Add a task
3. Mark a task as complete
4. Delete a task
5. Exit

Enter your choice (1-5): 5
Thank you for using Task Manager. Goodbye!
        
➜ View on GitHub

$ cat pnwet.txt

Python web app for Pacific Northwest weather data.

PNWet screenshot
➜ View on GitHub