Skip to content

Instantly share code, notes, and snippets.

View MarioLiebisch's full-sized avatar

Mario Liebisch MarioLiebisch

View GitHub Profile
@MarioLiebisch
MarioLiebisch / hexagons.cpp
Created August 29, 2019 06:43
A simple SFML program to draw a colored, hexagonal grid.
#include <SFML/Graphics.hpp>
#include <vector>
int main()
{
sf::RenderWindow window({640, 480}, "Hexagons", sf::Style::Default, sf::ContextSettings(0, 0, 8));
// We're simply abusing a `CircleShape` here,
// since a circle defined by 6 points IS a hexagon!
sf::CircleShape hexagon(25, 6);
@MarioLiebisch
MarioLiebisch / morse.ino
Created March 24, 2020 13:52
Simplified Morse Code Generator for Arduino
// Pins used for this
#define LED_PIN 13
#define BUZZER_PIN 11
// The time in milliseconds for short signals
#define TIME_UNIT 100
// Frequency used
// For classic codes both should match
#define FREQUENCY_LONG 220
#define FREQUENCY_SHORT 440
@MarioLiebisch
MarioLiebisch / aoc2021-day1.gd
Created December 1, 2021 09:48
Solution for Advent of Code 2021 day 1 using GDScript
# Execute with:
# godot --no-window -s aoc2021-day1.gd
extends SceneTree
func read_ints(file: String) -> Array:
var ints = []
var f = File.new()
f.open(file, File.READ)
if f.is_open():