Skip to content

Instantly share code, notes, and snippets.

View tamdaz's full-sized avatar
💭
Keep calm and contribute

Zohir Tamda tamdaz

💭
Keep calm and contribute
View GitHub Profile
@tamdaz
tamdaz / log.cr
Last active December 27, 2025 22:47
Customize the log
require "colorize"
LOGGER_COLORS = {
Log::Severity::Error => :red,
Log::Severity::Warn => :yellow,
Log::Severity::Info => :blue,
Log::Severity::Debug => :light_magenta,
}
formatter = Log::Formatter.new do |entry, io|
@tamdaz
tamdaz / livre.rs
Last active December 2, 2025 21:18
livre.rs
use std::io::{self, Write};
#[derive(Debug)]
struct Livre {
titre: String,
auteur: String,
annee: i32,
pris: bool,
}
@tamdaz
tamdaz / change-date.sh
Created August 2, 2024 13:54
Change the date of the files for each commit.
#!/bin/bash
COMMITS=$(git log --pretty=format:"%H %ad" --date=format:%Y%m%d%H%M.%S)
declare -a commit_array
while IFS= read -r COMMIT; do
commit_array+=("$COMMIT")
done <<< "$COMMITS"