Skip to content

Instantly share code, notes, and snippets.

View bryanhitc's full-sized avatar

Bryan Hitchcock bryanhitc

View GitHub Profile
@bryanhitc
bryanhitc / 55-bytes-of-css.md
Created November 2, 2022 03:47 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@bryanhitc
bryanhitc / Program.cs
Created December 17, 2021 20:52
lcu-sharp-event-example
using LCUSharp;
using LCUSharp.Websocket;
public class Program
{
public event EventHandler<LeagueEvent> GameFlowChanged;
private readonly TaskCompletionSource<bool> _work = new TaskCompletionSource<bool>(false);
public static async Task Main(string[] args)
{
@bryanhitc
bryanhitc / mi_349_seed_data.json
Last active December 13, 2019 04:54
Seed data for MI 349 final project
[
{
"id": 1,
"name": "Dessert Crepes",
"imageUrl": "assets/dessert-crepes.jpg",
"ingredients": [
{
"description": "4 eggs, lightly beaten"
},
{

Installing Python 3.7.3 on Raspbian =================================

As of April 2019, Raspbian does not yet include the latest Python release, Python 3.7.3 This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).

@bryanhitc
bryanhitc / test5.py
Last active April 5, 2019 03:40
SS19 CSE 480 - Project 5 Visible Tests
import unittest
from pprint import pprint
from Project.project import connect # , reset_state
class TestsProject5(unittest.TestCase):
# NOTE: This function is called after each test is ran (often referred to
# as the cleanup function). You may need to make a function that resets
# the state of your program (i.e remove all databases and clear all locks)
# in order to run the tests one after the other, otherwise your program
@bryanhitc
bryanhitc / test4.py
Last active March 26, 2019 20:54
SS19 CSE 480 - Project 4 Visible Tests
import unittest
from pprint import pprint
from Project.project import connect # , reset_state
class TestsProject4(unittest.TestCase):
# NOTE: This function is called after each test is ran (often referred to
# as the cleanup function). You may need to make a function that resets
# the state of your program (i.e remove all databases and clear all locks)
# in order to run the tests one after the other, otherwise your program
@bryanhitc
bryanhitc / MathGame.py
Last active October 13, 2019 20:53
Python Math Game Tutorial
import os
import operator as op
import random
completed = { "addition" : False, "subtraction" : False, "multiplication" : False, "division" : False }
math_dict = { "addition" : op.add, "subtraction" : op.sub, "multiplication" : op.mul, "division" : op.truediv }
# The main function.
def main():
print("""Welcome to this math based decision making game!