Skip to content

Instantly share code, notes, and snippets.

View vancanhuit's full-sized avatar
🎯
Focusing

vancanhuit vancanhuit

🎯
Focusing
View GitHub Profile
@vancanhuit
vancanhuit / starship.toml
Last active June 3, 2026 11:15
Starship config
# ~/.config/starship.toml
"$schema" = "https://starship.rs/config-schema.json"
command_timeout = 1000
format = """
$username\
$hostname\
$directory\
@vancanhuit
vancanhuit / config.toml
Created June 2, 2026 13:04
Global tools with `mise`
[tools]
ast-grep = "latest"
atuin = "latest"
bat = "latest"
bottom = "latest"
bun = "latest"
copilot = "latest"
dagger = "latest"
delta = "latest"
eza = "latest"
@vancanhuit
vancanhuit / .zshrc
Created June 2, 2026 13:03
ZSH config
# ~/.zshrc
# -----------------------------
# PATH
# -----------------------------
typeset -U path PATH
path=("$HOME/.local/bin" $path)
path=("$HOME/go/bin" $path)
export PATH
@vancanhuit
vancanhuit / create-container.sh
Created March 6, 2025 08:44
Incus RHEL profile with Macvlan network
#!/usr/bin/env bash
set -e
name=${1}
[[ -z ${name} ]] && {
echo "Name must be provided."
exit 1
}
@vancanhuit
vancanhuit / ansible.cfg
Created March 6, 2025 08:34
Ansible playbook for configuring Kubernetes nodes
[defaults]
interpreter_python = /usr/bin/python3
@vancanhuit
vancanhuit / ca.json
Last active August 18, 2024 15:04
Smallstep CA configuration
{
"root": "/etc/step-ca/certs/root_ca.crt",
"federatedRoots": null,
"crt": "/etc/step-ca/certs/intermediate_ca.crt",
"key": "/etc/step-ca/secrets/intermediate_ca_key",
"address": ":443",
"insecureAddress": "",
"dnsNames": [
"ca.lab.internal"
],
@vancanhuit
vancanhuit / selinux-incus-agent.sh
Last active September 11, 2024 13:04
Handling SELinux for incus-agent on Red Hat based VMs
# https://github.com/lxc/incus/commit/b2cd793ae4ce016ca7da128cc2d14544c041c801
# https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/using_selinux/changing-selinux-states-and-modes_using-selinux#enabling-selinux-on-systems-that-previously-had-it-disabled_changing-selinux-states-and-modes
semanage fcontext -a -t bin_t /var/run/incus_agent/incus-agent
restorecon -R /run/incus_agent
fixfiles -F onboot
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
indent_style = space
indent_size = 4
@vancanhuit
vancanhuit / apply-network-config.sh
Last active December 5, 2024 06:00
Incus/LXD: cloud-init static ip for containers and VMs
cat cloud-init-static-ip-container.yaml | incus config set <name> cloud-init.network-config -
cat cloud-init-static-ip-vm.yaml | incus config set <name> cloud-init.network-config -
@vancanhuit
vancanhuit / create-instance.sh
Last active February 25, 2025 00:35
Incus/LXD RHEL-based distro profile for a basic initialization
incus launch images:rockylinux/9/cloud test --profile rhel
incus launch images:rockylinux/9/cloud test-vm --vm --profile rhel --profile vm-config