Skip to content

Instantly share code, notes, and snippets.

View xitij2000's full-sized avatar
🍮
Alive

Kshitij Sobti xitij2000

🍮
Alive
View GitHub Profile
@xitij2000
xitij2000 / env.confg.jsx
Created March 20, 2025 14:53
Authoring MFE plugin for aspects
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
import {
Button,
Card,
Dropdown,
DropdownButton,
Icon,
IconButton,
IconButtonWithTooltip
} from '@openedx/paragon';
@xitij2000
xitij2000 / migrate-github-teams.py
Created January 16, 2025 05:25
Migrate GitHub team from the current per-CC mechanism to per-repo
# SPDX-FileCopyrightText: 2025-present Kshitij Sobti <[email protected]>
#
# SPDX-License-Identifier: MIT
from collections import defaultdict
from github import Github
from github import Auth
auth = Auth.Token("TOKEN")
g = Github(auth=auth)
@xitij2000
xitij2000 / env.config.jsx
Last active November 15, 2024 16:22
env.config.jsx file for learning MFE to test progress page plugins
import {getConfig} from '@edx/frontend-platform';
import {getAuthenticatedHttpClient, getAuthenticatedUser} from '@edx/frontend-platform/auth';
import {PLUGIN_OPERATIONS} from '@openedx/frontend-plugin-framework';
import {useEffect, useState} from 'react';
import {useSelector} from 'react-redux';
import {useModel} from "./src/generic/model-store";
import GradeSummary from "./src/course-home/progress-tab/grades/grade-summary/GradeSummary";
import DetailedGrades from "./src/course-home/progress-tab/grades/detailed-grades/DetailedGrades";
function useComponentVisibility(componentName) {

Replacement of progress page in Authoring MFE

Installation steps:

  • Clone this gist to a directory in your system.
  • Install it in the authoring MFE using npm install --no-save @openedx-plugins/course-app-progress@file:./path/to/this-repo

Testing steps:

  • Try using the new setting in this page.
@xitij2000
xitij2000 / proposed-new-pr-message-2024-09-13.md
Last active September 13, 2024 07:07
proposed-new-pr-message-2024-09-13

Thanks for the pull request, @someuser!

This repository is currently maintained by @some-team-or-user.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

@xitij2000
xitij2000 / tutor-devstack.py
Created August 18, 2023 11:22
tutor-devstack-plugin
import re
from urllib.parse import urlparse
import click
from tutor import hooks
from tutor import config as tutor_config
from tutor.commands.dev import DevContext
GITHUB_PR_REGEX = re.compile(
r"\/(?P[a-z0-9-_]+)\/(?P[a-z0-9-_]+)\/pull\/(?P[0-9]+)"
)
@xitij2000
xitij2000 / xblock-chat-sample.yml
Created September 17, 2020 17:48
Sample Code for XBlock Chat's YAML configuration
- welcome-step:
messages:
- alice: "Hello my name is Alice!"
- bob: "And I am Bob."
- alice: "Today we will ask you a basic trivia question."
- bob: "Would you like to continue?"
responses:
- "Yes": question-step
- "No": exit-step
- question-step:
from pathlib import Path
from babel.messages import pofile
from babel.messages.catalog import Catalog
missing = Catalog("ar")
changed = Catalog("ar")
added = Catalog("ar")
asu_django = pofile.read_po(Path("asu/django.po").open())
edx_django = pofile.read_po(Path("edx/django.po").open())

Keybase proof

I hereby claim:

  • I am xitij2000 on github.
  • I am kshitij_sobti (https://keybase.io/kshitij_sobti) on keybase.
  • I have a public key ASCDSzEM__3x_B4miMNan-U_WpXGxUrYWrxqkaQT19OBigo

To claim this, I am signing this object:

@xitij2000
xitij2000 / linux-game-save-locations
Last active June 27, 2019 15:01
A JSON file with paths to locations for game saves. (Scraped from PC Gaming Wiki)
[{"path": "~/.config/0ad/", "game": "0 A.D."},
{"path": "~/.local/share/aspyr-media/borderlands the pre-sequel/willowgame/", "game": "Borderlands: The Pre-Sequel"},
{"path": "~/Documents/BotaniculaSaves/settings.txt", "game": "Botanicula"},
{"path": "", "game": "Bridge Constructor"},
{"path": "", "game": "Boson X"},
{"path": "", "game": "Breach & Clear"},
{"path": "~/.Braid/", "game": "Braid"},
{"path": "", "game": "Braveland"},
{"path": "~/.local/share/aspyr-media/borderlands 2/willowgame/config/", "game": "Borderlands 2"},
{"path": "~/.BlocksThatMatterUserDatas/", "game": "Blocks That Matter"},