Skip to content

Instantly share code, notes, and snippets.

View ajeetraina's full-sized avatar
💭
Whalify Yourself !

Ajeet Singh Raina, Docker Captain, ARM Innovator, ajeetraina

💭
Whalify Yourself !
View GitHub Profile
@ajeetraina
ajeetraina / correct.yaml
Created March 1, 2023 10:32
Kubernetes YAML file
apiVersion: v1
kind: Service
metadata:
name: tutorial
spec:
ports:
- name: 80-tcp
port: 80
protocol: TCP
targetPort: 80
@ajeetraina
ajeetraina / Face_Recog.py
Last active January 8, 2023 12:53
Face Recognition Script
#Program to Detect the Face and Recognise the Person based on the data from face-trainner.yml
import cv2 #For Image processing
import numpy as np #For converting Images to Numerical array
import os #To handle directories
from PIL import Image #Pillow lib for handling images
labels = ["ajeet", "Elon Musk"]
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
@ajeetraina
ajeetraina / gist:1a8364e40f3f3971b408bf0ae92404eb
Created December 29, 2022 17:53
What does 'docker dev start' CLI do?
The docker dev start command is a development command that is used to start a development environment in Docker Desktop. This command is typically used when developing applications that run in Docker containers, as it allows you to easily test and debug your code within a containerized environment.
To use the docker dev start command, you will need to have a Docker Compose file that defines the services that make up your development environment. You can then run the docker dev start command, followed by the name of the Compose file:
`docker dev start -f docker-compose.yml`
This will start the development environment defined in the Compose file. You can then access your application and make changes to the code, which will be automatically reflected in the running containers.
It's worth noting that the docker dev start command is a development command and is not intended for production use. You should use a different approach, such as deploying your application to a production environment, when deploying y
@ajeetraina
ajeetraina / retweet.py
Last active December 29, 2022 17:40
Script that retweets all tweets with a certain search term,
To write a script that retweets all tweets with a certain search term, you will need to use the Twitter API. Here are the steps you can follow:
First, you will need to sign up for a Twitter developer account and create a new project. This will give you access to the API keys and secrets that you need to authenticate your API requests.
Install the required libraries. You will need to install the tweepy library to access the Twitter API. You can install it using pip install tweepy.
Authenticate your API requests. You will need to use your API keys and secrets to authenticate your API requests. You can do this by creating an OAuth1UserHandler object and passing it your API keys and secrets.
Search for tweets with a certain search term. You can use the tweepy.API.search() method to search for tweets with a certain search term. You can pass in the search term as a parameter, along with the number of tweets you want to retrieve.
@ajeetraina
ajeetraina / docker-compose.yml
Last active April 21, 2022 06:03
RedisZindagi
version: '3.7'
services:
redismod:
image: redis/redis-stack:latest
container_name: redis
restart: unless-stopped
environment:
EMAIL: zindagi@bhanu.dev
volumes:
@ajeetraina
ajeetraina / docker-compose.yml
Created April 14, 2022 11:28
Docker Compose for RedisZindagi
version: '3.7'
services:
redismod:
image: redislabs/redismod
container_name: redis
restart: unless-stopped
environment:
EMAIL: zindagi@bhanu.dev
volumes:
@ajeetraina
ajeetraina / environ.sh
Created February 22, 2022 05:18
Setting up Environment variables
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SECRET_KEY=
TMDB=
@ajeetraina
ajeetraina / clone.sh
Created February 22, 2022 05:17
Cloning the Movify repository
git clone https://github.com/redis-developer/movify
@ajeetraina
ajeetraina / run.sh
Last active February 22, 2022 05:15
Script to setup Movify
docker build -t redis21_backend backend/
docker build -t redis21_frontend frontend/
docker-compose up
@ajeetraina
ajeetraina / docker-compose.yml
Created February 22, 2022 05:14
Docker Compose File for Movify
version: '3.7'
services:
nginx:
  image: nginx:1.17
  volumes:
     - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
  ports:
    - 8000:80
  depends_on:
    - backend