Skip to content

Instantly share code, notes, and snippets.

View sxddhxrthx's full-sized avatar
😃
Having fun while it lasts

Siddhartha Chowdhury sxddhxrthx

😃
Having fun while it lasts
View GitHub Profile
@sxddhxrthx
sxddhxrthx / k8snode-setup.sh
Created December 22, 2025 13:30
bash script to setup k8s nodes
#!/bin/bash
setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
systemctl disable firewalld && systemctl stop firewalld
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
import json
with open('/etc/app_config/config.json', 'r') as config_file:
cfg = config_file.read()
configs = json.loads(cfg)
print(configs['GITHUB_URL'])
from contextlib import contextmanager
@contextmanager
def handle_division_error():
try:
yield
except ZeroDivisionError as zde:
print('zero division error')