# Stuff downloaded by yt-dlp comes out as webm, which is less supported in editors
ffmpeg -i input.webm -strict experimental output.mp4
# Alternatively just download & convert in a single step
yt-dlp VIDEO_ID --recode-video mp4 -o VIDEO_TITLE.mp4I had to figure this out for the nyt-connections project but wound up not using it because even with this auth scheme you can't list messages from chat rooms which allow non-domain users to be added.
Create a service account in https://console.cloud.google.com/iam-admin/serviceaccounts?supportedpurview=project
Delegating domain-wide authority to the service account (needs a pro workspace):
- From your Google Workspace domain's Admin console, go to Main menu menu > Security > Access and data control > API Controls.
You can paste this into devtools. Note that the clipboard API requires the document to be focused, so we wrap in a timeout. You need to switch focus to the active document before the timeout fires.
window.setTimeout(async () => {
const contents = await navigator.clipboard.read();
for (var i = 0; i < contents.length; i++) {
const item = contents[i];
const types = item.types;
await types.forEach(async (t) => {
This is an example of how to set up a Stripe Billing subscription with a short paid trialing period which automatically transitions into a regular price unless it is canceled. This was requested in https://twitter.com/abinaya_rl/status/1458275686930546693
Ability to start a trial period with
$1 for 7 days and then after the trial charge the users 10$ /monthly.
This behavior is currently possible using subscription schedules and an introductory price with a 1 week duration.
You need the Stripe CLI tool and jq installed.
| function onFormSubmit(e) { | |
| const itemResponses = e.response.getItemResponses(); | |
| const formData = itemResponses.map((ir) => { | |
| const i = ir.getItem(); | |
| return { | |
| 'question': i.getTitle(), | |
| 'response': getResponse(ir), | |
| }; | |
| }); | |
| const emailData = { |
| # Print the currently configured account's test mode API key (in case you need to pass to a script / curl): | |
| stripe config --list | awk '$1=="test_mode_api_key"{gsub(/"/, "", $3);print $3}' |
| function onFormSubmit(e) { | |
| const itemResponses = e.response.getItemResponses(); | |
| const formData = itemResponses.map((ir) => { | |
| const i = ir.getItem(); | |
| return { | |
| 'question': i.getTitle(), | |
| 'response': getResponse(ir), | |
| }; | |
| }); | |
| const emailData = { |
| /** | |
| * Copyright 2020 Malte Ubl | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
| * in compliance with the License. You may obtain a copy of the License at: | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed | |
| * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License |
| /** | |
| * This script sends an email in response to form submissions. | |
| * It formats metadata specified in the form and may be configured | |
| * to send to different audiences depending on which options are | |
| * chosen. The email is nicely formatted, suitable for ingestion | |
| * into Slack. | |
| **/ | |
| /** CHANGE THE FOLLOWING TO MATCH YOUR FORM **/ |
| # Install: | |
| # curl https://gist.github.com/kurrik/ec0a83cf568b9c16b8ce08dd407adf65/raw/.tmux.conf > ~/.tmux.conf | |
| # | |
| # Instructions: | |
| # When nested, use an extra `ctrl-b` to issue commands to the nested session. | |
| # E.g. to go to the next window `ctrl-b ctrl-b ctrl-n` | |
| # Colors | |
| set -g default-terminal "xterm-256color" |