Skip to content

Instantly share code, notes, and snippets.

apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-html
data:
index.html: |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@ChaitanyaChandra
ChaitanyaChandra / kube_dashboard.yaml
Last active December 17, 2023 09:32
kubernetes dashboard
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@ChaitanyaChandra
ChaitanyaChandra / .bashrc
Created May 19, 2022 17:43
automatic git commit. commit should be like this : automatic commit #1
# add this alias text on your ~/.bashrc file or ~/.zprofile
alias gitp="source ~/gitp.sh"
@ChaitanyaChandra
ChaitanyaChandra / code.sh
Last active May 11, 2022 14:12
aws cli to upgrade lambda runtime
#!/bin/bash
# listing all functions in csv format using Regular expressions
lambda_fun=$(
aws lambda list-functions \
--function-version ALL \
--region=us-east-2 \
--output text \
--query "Functions[?Runtime=='python3.6'].FunctionName" | sed -E 's/ +/\\n/g')
@ChaitanyaChandra
ChaitanyaChandra / code.sh
Last active February 18, 2022 02:28
shell script to clone all github repo
# you need to install gh (github api)
# windows : choco install gh
# mac : brew install gh
username="ChaitanyaChandra" # user name or org name is required
limit=100
gh repo list $username --limit $limit | awk '{print $1}' > out.txt
while read -r line; do echo "git clone https://github.com/$line.git" >> final.sh ; done < out.txt
chmod +x final.sh
./final.sh