Skip to content

Instantly share code, notes, and snippets.

View hrolfurgylfa's full-sized avatar

hrolfurgylfa

  • Iceland
  • 07:42 (UTC)
View GitHub Profile
@hrolfurgylfa
hrolfurgylfa / steamdeck_distrobox.sh
Last active December 18, 2023 00:04
Automatic distrobox setup for steamdecks.
GREEN='\033[0;32m'
NC='\033[0m' # No Color
mkdir -p ~/.local/bin
echo 'export PATH=$PATH:/home/deck/.local/bin' >> ~/.bashrc
curl -o ~/.local/bin/podman https://github.com/89luca89/podman-launcher/releases/latest/download/podman-launcher-amd64
chmod +x ~/.local/bin/podman
echo "${GREEN}Put a new password for your steamdeck that you can remember${NC}"
passwd
echo "${GREEN}Enter that password when prompted${NC}"
@hrolfurgylfa
hrolfurgylfa / functionalFizzBuzz.fsx
Created August 1, 2022 23:16
FizzBuzz solution in F#
let defaultIfEmpty func string =
match string with
| "" -> func ()
| _ -> string
let rec fizzBuzz acc curr endNum rules =
if curr = endNum then
acc
else
rules
@hrolfurgylfa
hrolfurgylfa / main.rs
Created February 18, 2022 14:35
A simple OSC sender example in Rust using the nannou_osc crate.
use nannou_osc::Type;
fn main() {
// Establish the connection
let addr = format!("{}:{}", "127.0.0.1", 9000);
let sender = nannou_osc::sender().unwrap().connect(addr).unwrap();
// Send the messages
sender.send(("/test", vec![Type::Float(0.4)])).ok();
sender.send(("/test/other", vec![Type::Bool(false)])).ok();