Skip to content

Instantly share code, notes, and snippets.

View rahul-yr's full-sized avatar

Rahul Reddy rahul-yr

View GitHub Profile
rahul-yr /
Created October 1, 2022 15:11
Raspberrry pi 4 debian setup
#! /bin/sh
# Update the system
sudo apt update
sudo apt upgrade -y
# Install snapd
sudo apt install snapd -y
sudo snap install core
rahul-yr / golang-docker-alpine-Dockerfile
Created September 18, 2022 13:13
Docker Golang light weight image Dockerfile
FROM golang:1.19.1-alpine3.16 as builder
COPY go.* ./
RUN go mod download
COPY . ./
RUN go build -v -o server
FROM alpine:3.16
COPY --from=builder /app/server /app/server
CMD ["/app/server"]
rahul-yr / index.js
Created September 9, 2022 05:04
Stream HLS Videos using plain HTML - Along with custom request headers to Video.js
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src=""></script>
rahul-yr /
Created September 6, 2022 07:14
Telegram Python bot snippets for getUpdates and InlineKeyboard
import requests
import json
def getUpdates():
api = "<token>/getUpdates"
# add headers
headers = {'Content-Type': 'application/json'}
# add body params
data = {'allowed_updates': ['update_id']}
# stringify body params
rahul-yr / main.go
Last active July 29, 2022 07:50
Firebase JWT authentication : Sample functions for token verification
package main
import (
rahul-yr /
Last active July 26, 2022 15:19
This is a code-server installation script on GCP VM. It has already configured with Ngnix, Cert Bot and Google Domains. You just need to update the input variables on the top section

This is a script to install and deploy code-server to your domain.

  • This enables you to access the vscode over the internet in a single click


  • Domain Name (Suggested Google Domains)
  • GCP or Azure or AWS Account


  • Web server : Nginx
  • SSL : Let's encrypt
rahul-yr /
Last active July 26, 2022 05:33
code-server ip address updation
rahul-yr / main.go
Created July 5, 2022 04:25
This is the entry point for Todo GraphQL server
package main
import (
rahul-yr / router.go
Created July 5, 2022 04:12
This is the todo router for Go GraphQL
package graph
import (
rahul-yr / install.go
Created July 4, 2022 15:26
Go TODO graphQL packages
// used as web server
// you could use any web server of your choice such as mux, http, go fiber etc
go get
// used for handling cors
go get
// is the actual module for implementing GraphQL Server
go get