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 / kodekloud_course_decks.md
Last active May 12, 2024 07:56
Course decks for KodeKloud
@debakarr
debakarr / KodeKloud_Scrapper.md
Last active March 4, 2024 22:20
Simple Python Script to download KodeKloud Resources

Disclaimer

Please use this only to keep your local copy. Please don't distribute the courses illegally. You will be responsible for the legal consequences.


Steps to follow

  • Sign in to kodekloud.com
  • Right Click -> Inspect -> Go to Network Tab -> Reload -> Select the first resource and copy the cookie:
  • Install Python and then some depencencies (use virtual environment if possible):
@debakarr
debakarr / winrt_python.md
Last active November 25, 2022 06:46
WinRT in Python using winsdk

Password Save/Retrive from Windows Vault

API Documentation:

# password_vault.py
from winsdk.windows.security.credentials import PasswordCredential, PasswordVault
  • Find who added code: git log --name-status --diff-filter=A --format='> %aN' -- | awk '/^>/ {tagline=$0}/^A\t/ {print tagline "\t" $0}'
@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
@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 / 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 / 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 / python_course_outline.md
Last active June 19, 2023 06:29
Python Course Outline
@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=