Skip to content

Instantly share code, notes, and snippets.

View Tracnac's full-sized avatar

Tracnac

View GitHub Profile
;;; init.el --- A small, sane Emacs configuration -*- lexical-binding: t; -*-
;;; Commentary:
;; This configuration deliberately starts with Emacs' built-in features. It is
;; fast, portable, and does not download packages while Emacs is starting.
;;; Code:
;; Keep Custom's generated settings out of this file.
(setq custom-file (locate-user-emacs-file "custom.el"))
@Tracnac
Tracnac / Odin.md
Last active June 18, 2026 07:26
Odin quick ref
Category Examples Notes
Basic int, u64, f64, bool, byte, string, rune Explicit sizes: i8, u16, f32, etc.
Array 4int, NT Fixed-length, value type
Slice []int Pointer+len, reference semantics
Dynamic array dynamicint Heap-backed, growable
Struct struct { x: int } Value type, can have methods via proc(s: ^T)
Union union { int, bool } Tagged or raw
Enum enum { A, B } Can have explicit values
- &var — address of var (produces a ^T)
- var^ — dereference the pointer (get the value at the address)
- ^T — pointer type
" Minimal Vim
" Bootstrap (run once in a shell):
if !filereadable(expand('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Create directories for persistent files (undo/backup/swap)
if has('win32')
@Tracnac
Tracnac / vimrc
Created October 14, 2025 14:20
Vim minimal
" Minimal Vim
if !exists('g:loaded_clean_vimrc')
let g:loaded_clean_vimrc = 1
set all&
set nocompatible
endif
" Create directories for persistent files (undo/backup/swap)
if has('win32')
let s:vim_dir = expand('$APPDATA') . '\\Vim'
@Tracnac
Tracnac / install_grafanaLoki.sh
Created May 12, 2025 11:53
Grafana and Loki installation on Debian 12
apt install curl ca-certificates
apt install -y postgresql-common
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
apt install postgresql-17 postgresql-client-17 postgresql-doc-17
apt-get install -y apt-transport-https software-properties-common wget
mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | tee /etc/apt/keyrings/grafana.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list
apt-get update
apt-get install grafana
@Tracnac
Tracnac / vimrc
Created February 26, 2024 14:08
Vim quick setup
" Reset to default
set all&
set nocompatible
if exists('g:loaded_vimrc')
finish
else
let g:loaded_vimrc = 'yes'
endif
@Tracnac
Tracnac / french.autohk
Created November 27, 2023 19:58
AutoHotkey French
; For azerty layout
<^>!o::Send "{U+0153}"
<^>!+o::Send "{U+0152}"
>+à::Send "{U+00C0}"
>+é::Send "{U+00C9}"
>+è::Send "{U+00C8}"
>+ç::Send "{U+00C7}"
@Tracnac
Tracnac / initChroot.sh
Created November 3, 2023 08:17
Void chroot #linux #shell
#!/usr/bin/env bash
if [[ -z "${1}" ]]
then
echo "Usage :"
echo " ${0}" chroot_dir
exit 1
fi
mkdir "${1}"
@Tracnac
Tracnac / tmux.sh
Created November 2, 2023 12:39
Tmux static
#!/bin/sh
export CC=cc
export REALCC=${CC}
export CPPFLAGS="-P"
# ANSI Color Codes
RED="\033[0;31m"
GREEN="\033[0;32m"
#YELLOW="\033[0;33m"
BLUE="\033[0;34m"
COLOR_END="\033[0m"