Skip to content

Instantly share code, notes, and snippets.

View Sterv's full-sized avatar

Stephen Sullivan Sterv

  • Music
  • Miami, Florida
View GitHub Profile
@Sterv
Sterv / gist:927717720ffb1ebaafd64105eb4f4189
Last active July 31, 2023 03:54
CLI Prompt to generate raw subtitles using SubsAI for Remotion Projects
const prompts = require('prompts');
const {exec} = require('child_process');
const fs = require('fs');
(async () => {
const response = await prompts({
type: 'text',
name: 'fileName',
message: 'What is the file name you want to generate subtitles for?',
description: 'Please enter the file name with the extension. Make sure it is in your public folder.',
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import SlicingDice from 'slicerjs';
const masterKey = `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfX3NhbHQiOiIxNTQ3NzYwNjgwOTA1IiwicGVybWlzc2lvbl9sZXZlbCI6MywicHJvamVjdF9pZCI6MzA5ODEsImNsaWVudF9pZCI6MTc1fQ.b9IMdEAo_sK1xZtPu5f9VrsP5STRhFskQPXEGq91WH4`;
const slicingdice = new SlicingDice({masterKey});
const aggQueryData = {
"query": [
{
"exercise-score": {
gte: 0,
import SlicingDice from 'slicerjs';
const masterKey = `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfX3NhbHQiOiIxNTQ3NzYwNjgwOTA1IiwicGVybWlzc2lvbl9sZXZlbCI6MywicHJvamVjdF9pZCI6MzA5ODEsImNsaWVudF9pZCI6MTc1fQ.b9IMdEAo_sK1xZtPu5f9VrsP5STRhFskQPXEGq91WH4`;
const slicingdice = new SlicingDice({masterKey});
const resultQueryData = {
"query": [
{
"exercise-score": {
"gt": 0,
{
// entity-id is a user id
"1232":{
"dimension":"testing",
"organization-id":[
{
"date":"2018-11-23T21:30:56.359Z",
"value":"icon-collective"
},
{
{
"076fefc3ab5f6b807dd8d56ae2b7c77f6aecc103@icon-collective": {
"dimension": "debug",
"organization-id":[
{"date":"2019-01-12T23:20:41.441Z","value":"icon-collective"},
{"date":"2019-01-12T23:21:11.141Z","value":"icon-collective"},
{"date":"2019-01-12T23:21:58.338Z","value":"icon-collective"},
{"date":"2019-01-12T23:23:38.878Z","value":"icon-collective"}
],
"assignment-id":[
{
"076fefc3ab5f6b807dd8d56ae2b7c77f6aecc103@icon-collective": {
"organization-id":[
{"date":"2019-01-12T23:20:41.441Z","value":"icon-collective"},
{"date":"2019-01-12T23:21:11.141Z","value":"icon-collective"},
{"date":"2019-01-12T23:21:58.338Z","value":"icon-collective"},
{"date":"2019-01-12T23:23:38.878Z","value":"icon-collective"}
],
"assignment-id":[
{"date":"2019-01-12T23:20:41.441Z","value":"kt4w1v2"},
import React, { Component } from 'react';
import Tone from 'tone';
class Player extends Component {
constructor(props){
super(props);
this.state = {
isLoadingAudioPlayer: false