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 / 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:
@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 / 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.

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 / 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) {
@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 <kshitij@sobti.in>
#
# 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.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';