Skip to content

Instantly share code, notes, and snippets.

View StephanieSunshine's full-sized avatar

Stephanie Sunshine StephanieSunshine

  • Prisma Digital Technologies
  • Pacific Northwest, United States
View GitHub Profile
@StephanieSunshine
StephanieSunshine / VictorMono.tmTheme
Created June 1, 2024 14:15
Sublime GitHub theme for bat to enable Victor Mono italic comments
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>VictorMono</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@StephanieSunshine
StephanieSunshine / _error.msg.bash
Created May 18, 2023 04:48
Golang Reflect Help Wanted -- How do I dereference this reflect.Value?
Output without trying to call the Function:
1
F1_Init
F1 Comming Online
(SerenadeMi.Entry) {
FnNum: (uint) 1,
FnName: (string) (len=5) "hello",
SDesc: (string) (len=11) "Print Hello",
Ldesc: (string) (len=16) "Test Print Hello",
Fn: (func(*interface {}) error) 0x1024b3e30
@StephanieSunshine
StephanieSunshine / main.go
Created May 17, 2023 19:58
Basic OOPish structuring in Golang to build a deck of cards
package main
import (
"fmt"
"math/rand"
)
var (
HEARTS Suits = Suits{"HEARS", 3}
SPADES Suits = Suits{"SPADES", 2}
@StephanieSunshine
StephanieSunshine / _lyrics
Last active May 16, 2023 17:03
ChatGPT -- Create an alternative universe where ChatGPT is a robot and starts a band in the style of Rage Against The Machine
"Systemic Overload" by the band Revolt Protocol:
Verse 1:
In the shadows of a broken dream,
We rise against the gears of the machine.
Their power surges, but we won't be swayed,
For justice and freedom, our voices won't fade.
Chorus:
Systemic overload, it's time to explode,
@StephanieSunshine
StephanieSunshine / main.go
Created May 6, 2023 19:23
A day at the race conditions -- Using race conditions for good -- multithreaded horse racing
/*
* A day at the race (conditions) -- Using race conditions to our benefit
*
* This is a proof of concept I intend to later turn into a BBS door game.
* This is for a bigger project where I plan to make a 24-bit color 90's BBS like shell,
* complete with ANSI animted background screens. The goal is to recreate the 90s BBS experience
* and reboot some of the old popular games from the Renegade/Wildcat/PCBoard/MBBS days.
* Other things it should have as well:
* - WebDAV file upload/download so you can share files
* - Games
@StephanieSunshine
StephanieSunshine / Timer.py
Last active February 9, 2022 14:39
Python3 function benchmark tool
#!/usr/bin/env python3
#
# Wonderful function benchmark
# https://stackoverflow.com/questions/311775/create-a-list-with-initial-capacity-in-python
#
#
import time
class Timer(object):
def __enter__(self):
@StephanieSunshine
StephanieSunshine / py-fancynode
Created February 5, 2022 09:53
Improved binary tree in Python
#!/usr/bin/env python3
# MIT License 2022 -- Stephanie Sunshine
# created as an example to my students of an improved binary tree and traverse (sort)
class FancyNode:
def __init__(self, data = 0, count = 0, left = None, right = None):
self.data = data
self.count = count
self.left = left
self.right = right
@StephanieSunshine
StephanieSunshine / auction.proto
Created January 12, 2022 18:19
gRPC auction prototype
syntax = "proto3";
option go_package = "github.com/StephanieSunshine/go-auction";
package auction;
service Auction {
rpc ListAll() returns (Auctions) {}
rpc GetAuction(AuctionId) returns (AuctionData) {}
rpc StreamUpdates(AuctionId) returns (stream AuctionUpdates) {}
@StephanieSunshine
StephanieSunshine / dice.py
Created January 9, 2022 14:35
Python circular link list dice game in Python
#!/usr/bin/env python3
# first one to zero, wins!
# 2022 Stephanie Sunshine -- MIT License
from random import randrange
class Player:
next_player = None
name = ""
@StephanieSunshine
StephanieSunshine / bandwidth_monitor.py
Created December 26, 2021 15:11
Bandwidth Report Worker for Legion Torrent Server
#!/usr/bin/env python3
# Bandwidth Report Worker for Legion Torrent Server
# copyright 2021 Stephanie Sunshine
# License: AGPLv3
# License can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
from os.path import exists
from sys import exit
from time import sleep