You have access control on views, but you also want to apply the same checks in templates in a maintainable way.
This kicked off my solution: https://stackoverflow.com/questions/43904784/reuse-the-decorator-of-a-view-from-a-template
You have access control on views, but you also want to apply the same checks in templates in a maintainable way.
This kicked off my solution: https://stackoverflow.com/questions/43904784/reuse-the-decorator-of-a-view-from-a-template
# Warning: This is not a complete script. | |
# You may also need to edit the transcript text to fix speaker names | |
# and make minor corrections before importing into Descript. | |
cat deepgram.json | jq -r ' | |
.results.channels[0].alternatives[0].paragraphs.paragraphs[] | |
| ("SPEAKER_" + (.speaker|tostring)) + ": " | |
+ ([.sentences[].text] | join(" "))' > transcript.txt |
#!/bin/bash | |
# Check out STEAM Powered (https://steampoweredshow.com/) where I have conversations | |
# with women in STEAM to learn a bit about what they do and who they are. | |
# https://steampoweredshow.com/learn-more/ | |
# Usage | |
# ===== | |
# | |
# Execute script in the directory containing the video and srts files, or modify to take |
// Don't do this. This is awful. | |
// Documenting it because it works, but stinks to hell. | |
Blah.play = async () => { | |
const actionListener = jest.fn(); | |
// Listen for events that log to the Actions tab. | |
const channel = addons.getChannel(); | |
channel.addListener("storybook/actions/action-event", actionListener); |
// If you have multiple rules in your workflow that need to update token data. | |
function (user, context, callback) { | |
user.app_metadata = user.app_metadata || {}; | |
const token_namespace = 'https://your-domain.com/app_metadata'; | |
// assumes your metadata object is shallow | |
const addCustomerId = stripe_customer_id => ({ | |
...context.idToken[token_namespace], |
""" | |
Check out STEAM Powered (https://steampoweredshow.com/) where I have conversations | |
with women in STEAM to learn a bit about what they do and who they are. | |
https://www.steampoweredshow.com/learn-more | |
""" | |
from pprint import pprint | |
from collections import OrderedDict | |
import sys | |
import re |
import { documentToReactComponents } from '@contentful/rich-text-react-renderer'; | |
import { graphql } from 'gatsby'; | |
import React from 'react'; | |
// Custom renderer for embedded content which accepts `body` / `references` from the graphql query. | |
// Search `references` for the embedded object ID for full access to nested content. | |
const rendererOptions = (references) => ({ | |
renderNode: { | |
[BLOCKS.EMBEDDED_ASSET]: (node) => { | |
const imageID = node.data.target.sys.id; |
const visit = require(`unist-util-visit`); | |
const remove = require(`unist-util-remove`); | |
const HTMLParser = require('node-html-parser'); | |
const matches = (classes, value) => { | |
const fragment = HTMLParser.parse(value); | |
if (!fragment.firstChild.classList) { | |
return false; | |
} |
""" | |
Check out STEAM Powered (https://steampoweredshow.com/) where I have conversations | |
with women in STEAM to learn a bit about what they do and who they are. | |
https://steampoweredshow.com/learn-more/ | |
""" | |
""" | |
Requirements | |
************ |
### | |
# WARNING: This config is for development use only. | |
# | |
# It was created using https://slurm.schedmd.com/configurator.html and modified | |
# enough for use on Docker kaldiasr/kaldi with slurm 16.05.9-1+deb9u. | |
# | |
# slurm < 20.02.7 is no longer available due to a security vulnerability. | |
# See: https://www.schedmd.com/archives.php | |
# Get the latest version and use the configurator from there. | |
### |