Skip to content

Instantly share code, notes, and snippets.

@smoothdvd
smoothdvd / providers.js
Last active February 5, 2022 08:47
server/services/providers.js
...
switch (provider) {
case 'our-provider': {
// 'our-provider' code here
break;
}
...
}
...
@smoothdvd
smoothdvd / index.js
Created February 5, 2022 08:51
server/bootstrap/index.js
...
const grantConfig = {
...,
'our-provider': {
// 'our-provider' configuration here
...
},
...
}
...
@smoothdvd
smoothdvd / index.js
Last active February 5, 2022 08:52
server/services/index.js
'use strict';
const jwt = require('@strapi/plugin-users-permissions/server/services/jwt');
const providers = require('./providers');
const user = require('@strapi/plugin-users-permissions/server/services/user');
const role = require('@strapi/plugin-users-permissions/server/services/role');
const usersPermissions = require('@strapi/plugin-users-permissions/server/services/users-permissions');
module.exports = {
jwt,
@smoothdvd
smoothdvd / youtube-downloader.py
Created September 6, 2011 00:14
Youtube Downloader
# Author: Abhinay Omkar
# Youtube Downloader
# Modifier: Alex Gao
# Youtube now uses cookies to verify download
import sys
from urllib2 import urlopen, unquote
from urlparse import parse_qs, urlparse
import requests