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
import pika
import logging
class Producer:
def __init__(self,host='localhost', exchanges=[], queues=[], conn_params=None):
self.queueNames = [ x.get('queue') for queue in queues ]
self.exchangeNames = [ x.get('exchange') for exchange in exchanges ]
if conn_params:
self.connection = pika.BlockingConnection(conn_params)
package main
import (
"flag"
"log"
"net/http"
"os"
)
var folderToServe string
#!/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
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 3
selector:
app: nginx
template:
metadata:
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
#!/bin/bash
echo "npm/yarn?"
read pm
echo "Selected $pm"
read -r -d '' tsconfig << EOM
{
"compilerOptions": {
"module": "commonjs",
#!/bin/bash
python3 -m http.server &
./ngrok http 8000
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
pip install -r requirements.txt -t ./python
find -type d -name __pycache__ -exec rm -rf {} \;
zip lambda_layer.zip -r ./python/
@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