Skip to content

Instantly share code, notes, and snippets.

View PratikBodawala's full-sized avatar

Pratik Bodawala PratikBodawala

View GitHub Profile
@fuxingloh
fuxingloh / app.js
Last active February 24, 2023 16:16
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()
@adamsvoboda
adamsvoboda / changefeed_consumer.py
Last active April 16, 2023 15:12
asynchronous rethinkdb change feeds with django channels
import asyncio
from rethinkdb import r, RqlRuntimeError
from channels import Group
r.set_loop_type('asyncio') # RethinkDB's driver must use asyncio for the loop type.
def create_changefeed_monitor(feeds):
"""
Creates a new asyncio event loop and starts the parallel execution of attach_changefeed