Skip to content

Instantly share code, notes, and snippets.

View Philipp-M's full-sized avatar

Philipp Mildenberger Philipp-M

  • Innsbruck, Austria
View GitHub Profile
@Philipp-M
Philipp-M / xilem_styling.rs
Created May 26, 2024 12:19
strong-typed styling xilem with traits
mod view {
use std::marker::PhantomData;
pub struct Color;
pub trait WithFgColor {
fn set_fg_color(&mut self, color: Color);
fn fg_color(&self) -> &Color;
}
{
services.xserver.displayManager = {
sessionPackages = [
(
let sessionName = "Hyprland"; in pkgs.writeTextFile
{
name = sessionName;
destination = "/share/wayland-sessions/${sessionName}.desktop";
text = ''
[Desktop Entry]
#include <cmath>
#include <glm/glm.hpp>
inline void findMinMax(float x0, float x1, float x2, float &min, float &max) {
min = max = x0;
if (x1 < min)
min = x1;
if (x1 > max)
max = x1;
if (x2 < min)
@Philipp-M
Philipp-M / OOP_inheritance.html
Created May 3, 2016 13:24
OOP Inheritance in Vue.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>vue inheritance</title>
</head>
<body>
<my-student></my-student>
<my-student first-name="Franz" last-name="Meier" :student-id="54321"></my-student>
<my-professor first-name="Jared" last-name="Josey"></my-professor>