Skip to content

Instantly share code, notes, and snippets.

View ltriant's full-sized avatar
🪐
floating through space

Luke Triantafyllidis ltriant

🪐
floating through space
View GitHub Profile
@ltriant
ltriant / life.nim
Last active October 17, 2019 06:09
Conway's Game of Life in Nim
# Conway's Game of Life
#
# Initialises the canvas randomly
#
# nimble install sdl2
# nim c -r life.nim
from random import randomize, rand
import sdl2
@ltriant
ltriant / aoc2019-07.rs
Created December 8, 2019 23:45
Advent of Code 2019 Day 7
use std::collections::VecDeque;
use itertools::Itertools;
#[derive(PartialEq)]
enum AddressingMode {
Position,
Immediate,
}
@ltriant
ltriant / hexdump.pl
Created May 12, 2020 12:02
hexdump.pl
#!/usr/bin/env perl
# A hex dumping function I use for work purposes.
use warnings;
use strict;
hex_dump("ABCDEFGHIJKLMNOPQRTUVWXYZ0123456789");
sub hex_dump {
my ($payload) = @_;
@ltriant
ltriant / config
Last active April 29, 2025 06:30
ghostty 🤝 oxocarbon
palette = 0=#161616
palette = 1=#262626
palette = 2=#393939
palette = 3=#525252
palette = 4=#dde1e6
palette = 5=#f2f4f8
palette = 6=#ffffff
palette = 7=#08bdba
palette = 8=#3ddbd9
palette = 9=#78a9ff
@ltriant
ltriant / hexdump.raku
Created January 6, 2026 21:42
simple hex viewer
#!/usr/bin/env raku
# hexdump.raku -- simple hex viewer
# @[email protected]
# no-color.org
my constant $NO_COLOR = %*ENV<NO_COLOR>:exists;
my $color_reset = "\x1b[0m";
my $color_bold = "\x1b[1m";
sub color_black(Str $s) { "\x1b[90m" ~ $s ~ $color_reset }