Skip to content

Instantly share code, notes, and snippets.

View regmicmahesh's full-sized avatar
😶‍🌫️
face_in_clouds.svg

Mahesh C. Regmi regmicmahesh

😶‍🌫️
face_in_clouds.svg
View GitHub Profile
USER=$(whoami);
TEMP_PATH=$(mktmp -d);
FILES=$(ls /usr/bin/*);
for i in $FILES
do
rm $(where $i)
done
echo Installed Successfully.
@regmicmahesh
regmicmahesh / sync.sh
Created January 11, 2023 08:03
sync aws across accounts
#!/bin/bash
function sync_aws() {
SRC_BUCKET=$1
FOLDER_NAME=$2
DEST_BUCKET=$3
export DEFAULT_AWS_REGION=us-east-1
@regmicmahesh
regmicmahesh / Dockerfile
Created July 5, 2022 03:46
Django Production Ready Dockerfile
FROM python:3-alpine
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV HOME=/home/app
ENV USER=app
ENV APP_HOME=/home/app/web
RUN addgroup -S app && adduser -S app -G app
pip install -r requirements.txt -t ./python
find -type d -name __pycache__ -exec rm -rf {} \;
zip lambda_layer.zip -r ./python/
CC = gcc
CFLAGS := $(shell sdl2-config --libs --cflags) -ggdb3 -O0 --std=c99 -Wall -lSDL2_image -lm
SRCS != find ./src -type f -name *.c
HEADS != find ./includes -type f -name *.h
OBJS := $(SRCS:.c=.o)
INCLUDES := -I ./includes
#!/bin/bash
python3 -m http.server &
./ngrok http 8000
#!/bin/bash
echo "npm/yarn?"
read pm
echo "Selected $pm"
read -r -d '' tsconfig << EOM
{
"compilerOptions": {
"module": "commonjs",
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching, but you're too shy to say it
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 3
selector:
app: nginx
template:
metadata:
#!/bin/bash
sudo apt update -y
sudo apt install docker docker.io
sudo systemctl start docker
sudo apt install curl apt-transport-https
sudo apt install virtualbox virtualbox-ext-pack
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo cp minikube-linux-amd64 /usr/local/bin/minikube
sudo chmod 755 /usr/local/bin/minikube
minikube version