{"id":15051055,"url":"https://github.com/laansdole/in-a-nutshell","last_synced_at":"2026-01-02T06:06:05.909Z","repository":{"id":182321146,"uuid":"668307928","full_name":"LaansDole/in-a-nutshell","owner":"LaansDole","description":"My DevOps Learning Journey on Debian/LINUX","archived":false,"fork":false,"pushed_at":"2024-09-03T10:17:13.000Z","size":7148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T21:52:50.535Z","etag":null,"topics":["debian-linux","gitconfig","shell","unix","zshrc"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LaansDole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-19T13:54:12.000Z","updated_at":"2024-09-03T10:17:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba085f5d-595c-4474-8e4a-8d6a0d5789c4","html_url":"https://github.com/LaansDole/in-a-nutshell","commit_stats":null,"previous_names":["laansdole/dot-journey","laansdole/in-a-nutshell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaansDole%2Fin-a-nutshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaansDole%2Fin-a-nutshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaansDole%2Fin-a-nutshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaansDole%2Fin-a-nutshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaansDole","download_url":"https://codeload.github.com/LaansDole/in-a-nutshell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243513307,"owners_count":20302924,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian-linux","gitconfig","shell","unix","zshrc"],"created_at":"2024-09-24T21:30:42.129Z","updated_at":"2026-01-02T06:06:05.903Z","avatar_url":"https://github.com/LaansDole.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌰 Welcome to my `in-a-nutsh` journey 🐚\nIn a nutshell, I need a way to streamline my Linux and MacOS setup whenever I setup those OS.\n  \n## ♾️ UNIX/Linux and DevOps Project\n- [MinIO System Admin](https://github.com/LaansDole/unix-sysadm-minio)\n- [CI/CD pipeline for RMIT Store](https://github.com/RMIT-DevOps-Hackathon/COSC2767-RMIT-Store)\n- [RMIT ITS Scripts](https://github.com/LaansDole/RMIT-ITS-useful-scripts)\n\n## Documentation\n\nThis project uses MkDocs for documentation. To view the documentation:\n\n1. Install MkDocs and required dependencies:\n```bash\npython -m venv venv\npip install mkdocs mkdocs-material mkdocs-minify-plugin\n```\n\n2. Serve the documentation locally:\n```bash\nmake serve\n```\n\n3. Build the documentation site:\n```bash\nmake build\n```\n\n4. (Optional) Deploy your project to Github Pages:\n```bash\nmake deploy\n```\n\n## Pre-requisite\n\n### On MacOS\n\nYou must have `Homebrew` installed\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\nFor best experience, ***[iTerm2](https://iterm2.com/)*** is recommended to install\n\n### On WSL2 or Linux Distros\n\nFor best experience, ***[OhMyZsh](./_zsh_/omz-init.sh)*** is recommended to install. \n\n## Getting Started\n\nThis repository contains my nerdy customizations:\n- For [git aliases](./_git_)\n- [zsh aliases](./_zsh_/.zsh-alias.sh)\n```bash\n# enable color support of ls, less and man, and also add handy aliases\nif [ -x /usr/bin/dircolors ]; then\n    test -r ~/.dircolors \u0026\u0026 eval \"$(dircolors -b ~/.dircolors)\" || eval \"$(dircolors -b)\"\n    export LS_COLORS=\"$LS_COLORS:ow=30;44:\" # fix ls color for folders with 777 permissions\n\n    alias ls='ls --color=auto'\n    #alias dir='dir --color=auto'\n    #alias vdir='vdir --color=auto'\n\n    alias grep='grep --color=auto'\n    alias fgrep='fgrep --color=auto'\n    alias egrep='egrep --color=auto'\n    alias diff='diff --color=auto'\n    alias ip='ip --color=auto'\n\n    export LESS_TERMCAP_mb=$'\\E[1;31m'     # begin blink\n    export LESS_TERMCAP_md=$'\\E[1;36m'     # begin bold\n    export LESS_TERMCAP_me=$'\\E[0m'        # reset bold/blink\n    export LESS_TERMCAP_so=$'\\E[01;33m'    # begin reverse video\n    export LESS_TERMCAP_se=$'\\E[0m'        # reset reverse video\n    export LESS_TERMCAP_us=$'\\E[1;32m'     # begin underline\n    export LESS_TERMCAP_ue=$'\\E[0m'        # reset underline\n\n    # Take advantage of $LS_COLORS for completion as well\n    zstyle ':completion:*' list-colors \"${(s.:.)LS_COLORS}\"\n    zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'\nfi\n\n# some more ls aliases\nalias ll='ls -l'\nalias la='ls -A'\nalias lla='ls -la'\nalias l='ls -CF'\n\n#### Change Directory ####\nalias cd..='cd ../'                        # Go back 1 directory level (for fast typers)\nalias ..='cd ../'                          # Go back 1 directory level\nalias .2='cd ../../'                       # Go back 2 directory levels\nalias .3='cd ../../../'                    # Go back 3 directory levels\nalias .4='cd ../../../../'                 # Go back 4 directory levels\nalias .5='cd ../../../../../'              # Go back 5 directory levels\nalias .6='cd ../../../../../../'           # Go back 6 directory levels\n\n#### Utilities ####\nalias qfind=\"find . -name \"                # qfind:     Quickly search for file\nalias help-shell=\"awk '/^# \u003e\u003e\u003e BEGIN MY ALIASES \u003e\u003e\u003e$/{flag=1}/^#$/{flag=0}flag' ~/.zshrc\"  # List all shell aliases\nalias help-git=\"awk '/^### MY GIT ALIASES ###$/{flag=1}/^#$/{flag=0}flag' ~/.gitconfig\"    # List all git aliases\nalias c='clear'                            # Clear terminal screen\n\nalias reset='source ~/.zshrc'              # Reload .zshrc configuration\nalias edit='vim ~/.zshrc'                  # Edit .zshrc file\nalias seesh='cat ~/.zshrc'                 # View .zshrc content\nalias clean-zone=\"find . -type f -name '*Zone.Identifier' -exec rm -f {} \\;\"  # Clean up Zone.Identifier files\nalias edit-alias='vim ~/.zsh-alias.sh'     # Edit aliases file\n\n# Replace with your own path\nalias sync-alias='./_zsh_/sync-zsh-alias.sh'  # Sync aliases to .zshrc\n\n# Optional: Reference to the original script for WSL file removal\n# alias rm=\"./scripts/utils/experimental/wsl-remove.sh Permanent\" # Permanent delete a file or folder\n\n# Make sure compinit has been run\nautoload -Uz compinit\ncompinit\n\n# Function to set up completion for ZSH aliases\nsetup_zsh_alias_completion() {\n  for name cmd in ${(kv)aliases}; do\n    # extract the \"real\" command (first word of the alias's right-hand side)\n    cmd=${cmd%% *}\n    # if zsh knows a _cmd completion function, use it\n    if whence -w _${cmd} \u0026\u003e/dev/null; then\n      compdef _${cmd} $name\n    fi\n  done\n}\n\n# Function to set up completion for git aliases\nsetup_git_alias_completion() {\n  # Skip if git is not installed or no aliases are defined\n  if ! command -v git \u0026\u003e /dev/null || ! git config --get-regexp '^alias\\.' \u0026\u003e /dev/null; then\n    return\n  fi\n\n  # Get all git aliases\n  local git_aliases=$(git config --get-regexp '^alias\\.' | sed 's/^alias\\.//')\n  \n  # Process each alias\n  while read -r line || [[ -n \"$line\" ]]; do\n    # Skip empty lines\n    [[ -z \"$line\" ]] \u0026\u0026 continue\n    \n    # Extract alias name and command\n    local alias=${line%% *}\n    local cmd=${line#* }\n    \n    # Skip shell commands (those starting with !)\n    if [[ \"$cmd\" == \"!\"* ]]; then\n      continue\n    fi\n    \n    # Set up git completion for this alias\n    compdef _git git-$alias\n  done \u003c\u003c\u003c \"$git_aliases\"\n}\n\n# Run the completion setup functions\nsetup_zsh_alias_completion\nsetup_git_alias_completion\n```\n\n## References and Bug Fixes\n- See [ZSH README](./_zsh_/README.md) for a clean installation of `node` and `npm` on different OS\n\u003cul\u003e\n  \u003cli\u003e\u003ca href=\"https://github.com/romkatv/powerlevel10k#getting-started\" target=\"_blank\"\u003ePowerlevel10k\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/\" target=\"_blank\"\u003eMust Have Git Aliases by @durdn - nicola paolucci\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://github.com/brandwe/Zprofile\" target=\"_blank\"\u003e.zprofile from @brandwe\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://github.com/koalaman/shellcheck#from-your-terminal\" target=\"_blank\"\u003eshellcheck\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://dev.to/colinkiama/a-time-saving-git-alias-git-sweep-bhn\" target=\"_blank\"\u003eA time-saving alias \"git sweep\"\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://stackoverflow.com/questions/43733089/how-to-configure-a-timeout-for-read-host-in-powershell\" target=\"_blank\"\u003eRead-HostWithTimeout in PowerShell\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://learn.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps\" target=\"_blank\"\u003eActiveDirectory Module\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://superuser.com/questions/1780111/cant-update-wsl-to-version-2\" target=\"_blank\"\u003eCan't update WSL to version 2\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://www.tecmint.com/install-oh-my-zsh-in-ubuntu/\" target=\"_blank\"\u003eInstall OhMyZsh in Ubuntu\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaansdole%2Fin-a-nutshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaansdole%2Fin-a-nutshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaansdole%2Fin-a-nutshell/lists"}