Skip to content

Instantly share code, notes, and snippets.

View alexolinux's full-sized avatar
🤠
Working from home

Alex Mendes alexolinux

🤠
Working from home
View GitHub Profile
@alexolinux
alexolinux / docker-vscode.sh
Last active May 19, 2024 13:23
code-server Docker container
#https://hub.docker.com/r/linuxserver/code-server
docker run -d \
--name=code-server \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e PASSWORD="${PASSWORD}" \
-e SUDO_PASSWORD="${SUDO_PASSWORD}" \
-e DEFAULT_WORKSPACE=/config/workspace \
@alexolinux
alexolinux / ccat-install.sh
Last active June 27, 2025 15:06
ccat package installation.
#!/bin/bash
# Colors
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# https://github.com/owenthereal/ccat/releases
CCAT_VER="1.1.0"
BIN_DIR="${HOME}/.local/bin"
@alexolinux
alexolinux / k3d-controller.sh
Last active November 22, 2024 00:02
K3d Cluster control as a service
#!/bin/bash
#-- ---------------------------
#-- Author: alexolinux -------
#-- ---------------------------
k3dCheck(){
command -v k3d > /dev/null
if [ $? -eq 0 ]; then
@alexolinux
alexolinux / helm-install.sh
Last active January 27, 2024 18:56
Helm Installation for Linux distros.
#!/bin/bash
set -e
echo "Starting Helm Installation..."
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod +x get_helm.sh
./get_helm.sh
@alexolinux
alexolinux / k8s-cleanUp.sh
Last active February 1, 2024 16:26
Clean Up kubeadm confs (Useful for reinstallation or adjustments)
#!/bin/bash
# Remove/clean UP
clear && echo "Seek and Remove!"
sleep 3
kubeadm reset -f
sudo rm -rf /etc/cni /etc/kubernetes /var/lib/dockershim /var/lib/etcd /var/lib/kubelet /var/run/kubernetes ~/.kube/*
iptables -F && iptables -X
iptables -t nat -F && iptables -t nat -X
@alexolinux
alexolinux / vimrc
Last active April 14, 2024 10:23
My custom vimrc
syntax on
set showcmd
set hlsearch
set wildmenu
set ai
set si
set et
set sw=2
set ts=2
@alexolinux
alexolinux / dns-scraper.sh
Last active November 24, 2024 22:07
Shell script to look up DNS registers and catch up IPs being populated in /etc/hosts
#!/bin/bash
labserver_list=(
host1.mylabserver.com
host2.mylabserver.com
host3.mylabserver.com
)
echo "Backing Up Hosts..."
sudo cp -p /etc/hosts /etc/hosts.save
@alexolinux
alexolinux / jenkins-install.sh
Created January 16, 2024 11:34
Script to install Jenkins - Based on official documents from January, 2024
#!/bin/bash
#https://www.jenkins.io/doc/book/installing/linux/
# Functions
command_exists() {
command -v "$1" >/dev/null 2>&1
}
check_command_status() {
@alexolinux
alexolinux / kube-env.sh
Last active November 28, 2024 16:02
ZSH kubectl auto-complete & kube-aliases
#!/bin/bash
ZSHRC_FILE="${HOME}/.zshrc"
ZSH_PLUGINS=(
kubectl
kube-aliases
kubectl-autocomplete
)
TEMP_FILE=$(mktemp)
@alexolinux
alexolinux / myzsh-environment.sh
Last active December 12, 2024 21:31
Configure ZSH: Becoming USER Shell more productive.
#!/bin/bash
GROUP_NAME="devops"
GROUP_SUDO="/etc/sudoers.d/devops"
ZSHRC_FILE="${HOME}/.zshrc"
ZSH_PLUGINS=(
zsh-syntax-highlighting
zsh-autosuggestions
)