Skip to content

Instantly share code, notes, and snippets.

View debakarr's full-sized avatar
😅
I may be slow to respond.

Debakar Roy debakarr

😅
I may be slow to respond.
View GitHub Profile
@debakarr
debakarr / job-apply.md
Last active May 17, 2024 05:47
Link to some of the companies job apply portal for India
@debakarr
debakarr / final.py
Last active March 6, 2024 04:23
Windows studio access using API in Python
import asyncio
import uuid
from ctypes import c_uint32, c_uint64, c_char, Structure, sizeof
from enum import Enum
from winsdk.windows.media.devices import MediaDevice
from winsdk.windows.devices.enumeration import DeviceInformation, Panel
from winsdk.windows.media.capture import (
MediaCapture,
MediaCaptureInitializationSettings,
@debakarr
debakarr / KodeKloud_Quiz.md
Created September 28, 2023 06:14
Quiz from kodekloud.md

KodeKloud Quiz

test

1. What is the command to view the version of docker engine installed?

  • docker --version
  • docker version
  • docker engine info
@debakarr
debakarr / config.lua
Last active December 18, 2023 07:40
My dev setup
-- "C:\Users\<username>\AppData\Local\lvim\config.lua"
-- Enable powershell as your default shell
vim.opt.shell = "pwsh.exe"
vim.opt.shellcmdflag =
"-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;"
vim.cmd [[
let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
let &shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
set shellquote= shellxquote=
@debakarr
debakarr / python_course_outline.md
Last active June 19, 2023 06:29
Python Course Outline
@debakarr
debakarr / PowerShell_Via_Python.md
Last active May 20, 2023 06:27
Calling PowerShell Command via Python

You first need to install pythonnet and pypsrp

pip install pythonnet pypsrp

Below is the code which uses pythonnet to execute the powershell command and pypsrp to deserialize it into Python object:

@debakarr
debakarr / delete_missing_upsteam_branch.md
Created April 21, 2023 04:44
Delete branch which are missing upstream

To delete all branches that are missing upstream, you can use the following Git commands. This will first list all branches that are missing upstream, and then delete them one by one.

  1. First, fetch the latest information from the remote repository:

git fetch --all --prune

  1. List all branches that are missing upstream:

git branch -vv | grep ': gone]' | awk '{print $1}'

@debakarr
debakarr / Kubernetes 101 demo commands.md
Last active April 11, 2023 09:02
Kubernetes 101 demo on KillerCoda Playground

Opening KillerCoda Kubernetes Playground

Configure KubeView

Commands:

@debakarr
debakarr / README.md
Last active March 5, 2023 15:42
Unlimited Quiz Generator

Simple streamlit application to generate unlimited quiz on any topic.

Installation

pip install streamlit openai

To run

streamlit run main.py
  • Find who added code: git log --name-status --diff-filter=A --format='&gt; %aN' -- | awk '/^&gt;/ {tagline=$0}/^A\t/ {print tagline "\t" $0}'