Skip to content

Instantly share code, notes, and snippets.

View bvenkatr's full-sized avatar
🏠
Working from home

Venkat bvenkatr

🏠
Working from home
View GitHub Profile
@bvenkatr
bvenkatr / app.js
Created August 29, 2021 09:16 — forked from fuxingloh/app.js
How to use express.js and passport.js with G Suite SAML Apps SSO
const express = require('express')
const SamlStrategy = require('passport-saml').Strategy
const passport = require('passport')
const cookieSession = require('cookie-session')
const cookieParser = require('cookie-parser')
// Create express instance
const app = express()
@bvenkatr
bvenkatr / postman-pre-request.js
Created January 13, 2021 10:38 — forked from bcnzer/postman-pre-request.js
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@bvenkatr
bvenkatr / delete_git_submodule.md
Created December 11, 2020 17:24 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule

Third Party Authentication Features in Open edX: Technical Knowledge Transfer

Part 1: Background / Notes

  • Open edX has full, integrated support for three different types of third party auth provider:
    1. OAuth based providers (OAuth2 and the older OAuth v1). Google, Facebook, LinkedIn, and Azure Active Directory are available by default. Any other OAuth backends supported by python-social-auth v0.2.12 can be enabled by changing a configuration setting. Contributed by Google (John Cox).
    2. SAML / Shibboleth. SAML is an SSO standard mostly used by universities and corporations. Shibboleth is the name of a particular implementation of SAML, commonly used by higher ed. institutions.
    3. LTI. Users can use Learning Tools Interoperability® (LTI®) to authenticate. Support for this was contributed by UBC.
  • The Open edX platform also includes limited support for the following SSO providers.
  1. [
@bvenkatr
bvenkatr / http_get.go
Created January 2, 2020 17:16 — forked from hidva/http_get.go
golang wget
package main
import (
"context"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"time"
@bvenkatr
bvenkatr / edx-course-backup.sh
Created December 30, 2019 10:35
Taking edx courses backup
#!/usr/bin/env bash
######################################################
#
# https://wiki.bash-hackers.org/howto/getopts_tutorial
# https://sookocheff.com/post/bash/parsing-bash-script-arguments-with-shopts/
######################################################
function help() {
echo -e "EdX Course Backup Script\n"
@bvenkatr
bvenkatr / reset bitbucket password
Created December 4, 2019 11:54
To bitreset bitbucket password, useful to enter at the git command line when asked for https urls
https://id.atlassian.com/login/resetpassword?application=bitbucket&continue=https%3A%2F%2Fid.atlassian.com%2Fopenid%2Fv2%2Fop%3Fopenid.sreg.optional%3Dfullname%2Cnickname%2Cemail%26openid.return_to%3Dhttps%3A%2F%2Fbitbucket.org%2Fsocialauth%2Fcomplete%2Fatlassianid%2F%3Fjanrain_nonce%253D2019-12-04T11%25253A46%25253A28ZpvV1ql%26openid.realm%3Dhttps%3A%2F%2Fbitbucket.org%26openid.ns.sreg%3Dhttp%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1%26openid.ns.crowdid%3Dhttps%3A%2F%2Fdeveloper.atlassian.com%2Fdisplay%2FCROWDDEV%2FCrowdID%252BOpenID%252Bextensions%2523CrowdIDOpenIDextensions-login-page-parameters%26openid.ns%3Dhttp%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%26openid.mode%3Dcheckid_setup%26openid.identity%3Dhttp%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select%26openid.crowdid.application%3Dbitbucket%26openid.claimed_id%3Dhttp%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select%26openid.assoc_handle%3D23003747&email=chethan4046%40gmail.com&errorCode&prompt=&tenant=
@bvenkatr
bvenkatr / cloudSettings
Last active October 18, 2021 02:40
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-10-18T02:40:03.205Z","extensionVersion":"v3.4.3"}
@bvenkatr
bvenkatr / webscrapeOfSongs.js
Created July 29, 2019 11:32
scraping Mohammed_Rafi songs
/**
* Get the URL for Rafi's song list that matches with your first letter of your name
* Main songs list url: https://en.wikipedia.org/wiki/List_of_songs_recorded_by_Mohammed_Rafi
* Make a request to get data from the given URL and find the link that is relavent for
* list of songs
*
* @params startLetter - This is the letter to get the link for
* @return URL for list of songs matches with first letter of your name
*/