This file contains 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/bash -eu | |
# author: Nathanael Gandhi | |
# github.com/NathanaelGandhi | |
################################################################################ | |
# Source required functions # | |
################################################################################ | |
bash_utils_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/bash_utils" | |
mkdir -p "$bash_utils_dir" | |
echo " • Sourcing required functions" |
This file contains 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/bash -eu | |
# author: Nathanael Gandhi | |
# github.com/NathanaelGandhi | |
# If the user is not root, it performs the following actions: | |
# 1. It assigns the absolute path of the currently running script to the variable exe_name using the readlink -f command. This ensures that exe_name contains the full path of the script even if it was executed using a relative path. | |
# 2. It then uses sudo to execute the script again as root, passing the same script path ($exe_name) and any command-line arguments ($@) to it. | |
# 3. Finally, it exits the current instance of the script with the same exit code ($?) as the root-executed script. | |
# In summary, this code snippet is designed to ensure that the script is run with root privileges. If it's not being run as root, it will re-execute itself using sudo to gain the necessary privileges. |
This file contains 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/bash -eu | |
# author: Nathanael Gandhi | |
# github.com/NathanaelGandhi | |
################################################################################ | |
# setup locale information # | |
################################################################################ | |
setupLocale() | |
{ | |
locale_id=en_AU.UTF-8 |
This file contains 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/bash -eu | |
# author: Nathanael Gandhi | |
# github.com/NathanaelGandhi | |
################################################################################ | |
# setup ssh # | |
################################################################################ | |
setupSsh() | |
{ | |
echo " • Setup ssh access" |
This file contains 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
################################################################################ | |
# Title: Clang format file for C/C++ projects | |
# Author: Nathanael Gandhi | gist.github.com/NathanaelGandhi | |
# Notes: see https://clang.llvm.org/docs/ClangFormatStyleOptions.html | |
################################################################################ | |
--- | |
BasedOnStyle: Google | |
Language: Cpp | |
IndentWidth: 4 | |
UseTab: Never |
This file contains 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
################################################################################ | |
# Title: Development Container for STM32 projects | |
# Author: Nathanael Gandhi | gist.github.com/NathanaelGandhi | |
# Notes: Container for all project dependencies. Intended to be run using | |
# distrobox. Can be built with either Docker or Podman. | |
################################################################################ | |
# Base Image | |
FROM ubuntu:22.04 | |
################################################################################ | |
# Base Configuration |
This file contains 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
################################################################################ | |
# Title: Development Container for building Doxygen documentation | |
# Author: Nathanael Gandhi | gist.github.com/NathanaelGandhi | |
# Notes: Container for all project dependencies. Intended to be run using | |
# distrobox. Can be built with either Docker or Podman. | |
################################################################################ | |
# Base Image | |
FROM ubuntu:22.04 | |
################################################################################ | |
# Base Configuration |
This file contains 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/bash -eu | |
apt-get install -y wget zsh fonts-powerline && \ | |
echo "[config-zsh] installing oh-my-zsh" && \ | |
wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O - | zsh || true && \ | |
echo "[config-zsh] installing oh-my-zsh plugins" && \ | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \ | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && \ | |
sed -i 's|plugins=(git)|plugins=(git zsh-autosuggestions zsh-syntax-highlighting)|g' ~/.zshrc && \ | |
echo "[config-zsh] setting theme to agnoster" && \ |
This file contains 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/bash -eu | |
## Author: Nathanael Gandhi | |
################################################################################ | |
if [ -d ~/.oh-my-bash ] | |
then | |
echo "Directory ~/.oh-my-bash already exists. Not installing" | |
else |
This file contains 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
ci: | |
autofix_prs: false | |
fail_fast: false | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.6.0 | |
hooks: | |
- id: check-added-large-files | |
- id: check-ast | |
- id: check-case-conflict |
OlderNewer