Skip to content

Instantly share code, notes, and snippets.

View regisb's full-sized avatar
🌠
Currently working on: telepathy xblock for Open edX

Régis Behmo regisb

🌠
Currently working on: telepathy xblock for Open edX
View GitHub Profile
# Usage
#
# tutor plugins install https://gist.githubusercontent.com/regisb/4049622ec4b48cbd48c89ec708dc5252/raw/docker-registry-cache.py
# tutor plugins enable docker-registry-cache
#
# Cache will automatically be pulled from registry when you run:
#
# tutor images build openedx
#
# You can also push after building:
@regisb
regisb / tutor-mysqlutf8mb4.yml
Last active July 26, 2022 18:28
Tutor plugin for adding utf8mb4 support to MySQL
# Enable utf8mb4 character support in mysql.
# See this conversation for further information: https://discuss.overhang.io/t/utfmb4-instead-of-utf8mb3-442/1590
# Use this plugin as follows:
#
# tutor plugins install https://gist.githubusercontent.com/regisb/13208737b639a13ec9eb47d5aeb2747c/raw/e8845c6a5a11d0e1f0c2fe920d9d9bdddf13af71/tutor-mysqlutf8mb4.yml
# tutor plugins enable mysqlutf8mb4
# tutor config save
# tutor local reboot
#
# Note: this plugin is not compatible with Kubernetes deployments.
@regisb
regisb / tutor-disablefloc.yml
Last active April 19, 2021 08:48
tutor-disablefloc
name: disablefloc
version: 0.1.0
patches:
# As suggested by https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
nginx-lms: |
add_header Permissions-Policy interest-cohort=();
nginx-cms: |
add_header Permissions-Policy interest-cohort=();
# This is a Tutor plugin designed to disable course search, usually present at in http://lms.host/courses.
# To start using this plugin, run:
#
# tutor plugins install https://gist.githubusercontent.com/regisb/247b654b8c54bfb03c9ae6768eb7d8b4/raw/c069ff967b128dee6a6154645350e6972188764b/disable_course_discovery.yml
# tutor plugins enable disable_course_discovery
# tutor config save
# tutor local restart lms
#
# As a consequence, courses can be hidden from the catalog: go to
# http://studio.lms.host/ -> your course -> Advanced Settings and set "Course Visibility In Catalog" to "none".
@regisb
regisb / enablebulkenrollment.yml
Created May 12, 2020 10:16
Tutor plugin to enable bulk enrollment view in LMS
name: enablebulkenrollment
version: 0.1.0
patches:
lms-env-features: |
"ENABLE_BULK_ENROLLMENT_VIEW": true
@regisb
regisb / skipemailvalidation.yml
Last active May 12, 2020 10:08
Skip email validation plugin for Tutor: new users will not have to validate their account
name: skipemailvalidation
version: 0.1.0
patches:
common-env-features: |
"SKIP_EMAIL_VALIDATION": true
@regisb
regisb / make_openedx_jwk.py
Last active October 15, 2021 16:46
useful piece of code to manually generate private/public JWK in edx-platform
"""
To add the private and public JWK to edx-platform in Juniper, you should do something similar to the following code.
First install dependendies with:
pip install pycryptodome
"""
import json
from Crypto.PublicKey import RSA
name: fixdiscoveryoauth
version: 0.1.0
patches:
openedx-common-settings: |
OAUTH_OIDC_ISSUER = "{{ JWT_COMMON_ISSUER }}"
#! /usr/bin/env python
# A while ago, I had the impression that the main Slack team I was
# participating in had more and more "@everyone", "@all" and "@channel"
# mentions, which was bothering me. So I made a script to measure the evolution
# over time of the number of mentions. (turned out I was wrong)
from collections import defaultdict
from datetime import datetime
from slacker import Slacker
TOKEN = 'your slack token here'

Keybase proof

I hereby claim:

  • I am regisb on github.
  • I am regisb (https://keybase.io/regisb) on keybase.
  • I have a public key ASBsBbEsVo95lMpyFseNYfGcXYkrTBPj_SR5BMohwevxcgo

To claim this, I am signing this object: