| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; 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")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - &var — address of var (produces a ^T) | |
| - var^ — dereference the pointer (get the value at the address) | |
| - ^T — pointer type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " 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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Reset to default | |
| set all& | |
| set nocompatible | |
| if exists('g:loaded_vimrc') | |
| finish | |
| else | |
| let g:loaded_vimrc = 'yes' | |
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; For azerty layout | |
| <^>!o::Send "{U+0153}" | |
| <^>!+o::Send "{U+0152}" | |
| >+à::Send "{U+00C0}" | |
| >+é::Send "{U+00C9}" | |
| >+è::Send "{U+00C8}" | |
| >+ç::Send "{U+00C7}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if [[ -z "${1}" ]] | |
| then | |
| echo "Usage :" | |
| echo " ${0}" chroot_dir | |
| exit 1 | |
| fi | |
| mkdir "${1}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" |
NewerOlder