Skip to content

Instantly share code, notes, and snippets.

View stungeye's full-sized avatar

Kyle Geske stungeye

View GitHub Profile
@stungeye
stungeye / .gitignore
Created November 15, 2022 16:29
A .gitignore File for openFrameworks Projects Which Correctly Allows Required Files in the bin and bin/data Folders
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
@stungeye
stungeye / ofApp.cpp
Created October 27, 2022 22:00
Collision Detection Using openFrameworks and ofRectangle
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup() {
}
//--------------------------------------------------------------
void ofApp::update() {
a2.update({static_cast<float>(ofGetMouseX()), static_cast<float>(ofGetMouseY())});
}
@stungeye
stungeye / math_input.cpp
Created September 8, 2022 19:32
A simple console based calculator with data validation.
#include <iostream>
#include <limits>
int main()
{
int number1 , number2;
char sign;
while (true) {
std::cout << "Enter 2 numbers seperated by a + or - sign \n";
@stungeye
stungeye / .p4ignore
Created September 6, 2022 21:10
Unreal Engine Perforce Ignore File
# Visual Studio user specific files
.vs/
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
@stungeye
stungeye / pi.rb
Created July 23, 2022 11:46
Sonic Pi Demo
live_loop :bass_drum do
##| sample :bd_haus
sample :bd_haus, cutoff: 70, amp: 4
sleep 0.5
end
live_loop :amen_break do
##| sample :loop_amen, beat_stretch: 2
@stungeye
stungeye / code_of_conduct.md
Last active July 19, 2022 18:39
Sound + Code = Jam 🎶 Code of Conduct

Why Have a Code of Conduct?

We want all attendees to be able to focus their full attention on learning and creating at this event. This is impossible to do if you are being harassed or discriminated against. Accordingly, all attendees are expected to show respect and courtesy to each other in all interactions.

To make sure that everyone has a common understanding of “show respect and courtesy to each other,” we have adopted the following code of conduct.

Sound + Code = Jam 🎶 Code of Conduct

The Sound + Code = Jam event is committed to providing a friendly, safe and welcoming environment for all, regardless of gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or another similar characteristic.

@stungeye
stungeye / header.h
Created April 12, 2022 16:03
Shape and Derived Shapes
// Define a new class called Shape
//
// Properties of Shape:
// - color (ofColor) // ofColor::cadetBlue
// - position (glm::vec2) // {0, 0}
//
// Constructor that takes in a ofColor and a glm::vec2
// and uses those parameters to initial the properties.
//
@stungeye
stungeye / main.cpp
Created April 5, 2022 15:24
Base and Derived Classes and Objects in C++ (With References and Pointers)
#include <iostream>
#include <string>
class Base {
protected:
int value{0};
public:
Base(int value) : value{value} {
std::cout << "Base Constructor\n";
}
@stungeye
stungeye / main_with_pointer.cpp
Last active February 13, 2023 18:23
Has-As Class Relationship with and without Pointers
/*
Imagine this code was written before initializer lists. (Pre C++11)
When compared with `main_without_pointer_oldskool_and_broken.cpp`:
- Point's location member is a pointer to a Location.
- Location does not need a default constructor.
- The location member is only constructed once.
*/
#include <iostream>
@stungeye
stungeye / instructions.md
Created February 4, 2022 04:35
Getting Started with Eleventy using WSL 2

Getting Started with Eleventy using WSL 2

  1. Install WSL and enable WSL2.
  2. Ensure everything is up to date from the WSL prompt:
    sudo apt update 
    sudo apt upgrade
    sudo apt install build-essential
    
  3. Install Node: curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash