Skip to content

Instantly share code, notes, and snippets.

@guillermoscript
guillermoscript / index.py
Created January 10, 2024 23:57
How to transcribe audios bigger than 25MB with Whisper AI
import openai
import mimetypes
from pydub import AudioSegment
import os
load_dotenv()
openai.api_key = os.getenv('OPEN_AI_KEY')
app = Flask(__name__)
#!/usr/bin/env python3
import whisper
import sys
import string
import math
from stable_whisper import modify_model
from stable_whisper import stabilize_timestamps
from stable_whisper import results_to_word_srt
from stable_whisper import results_to_word_srt
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips
@marcusstenbeck
marcusstenbeck / ExampleComponent.tsx
Last active November 21, 2022 20:33
Remotion + Popmotion
import * as popmotion from 'popmotion';
import { pop } from './RemotionPop';
const easeOutQuint = popmotion.cubicBezier(0.22, 1, 0.36, 1);
const ExampleComponent = () => {
// you can animate any normal HTML element, ex. `pop.h2` or `pop.span`
return (
<pop.div
@WillBrubaker
WillBrubaker / file.php
Created December 12, 2018 11:35
WooCommerce redirect to cart if trying to add a 'sold individually' item that is already in the cart
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/
add_filter( 'woocommerce_add_to_cart_sold_individually_found_in_cart', 'handsome_bearded_guy_maybe_redirect_to_cart' );
function handsome_bearded_guy_maybe_redirect_to_cart( $found_in_cart ) {
if ( $found_in_cart ) {
wp_safe_redirect( wc_get_page_permalink( 'cart' ) );
exit;
}
@steven2358
steven2358 / ffmpeg.md
Last active May 5, 2024 12:45
FFmpeg cheat sheet
@jashmenn
jashmenn / final-cut-it-out.js
Created September 21, 2017 11:44
Remove Silence from Final Cut Pro clips, automatically, using ffmpeg timecodes and OSX JavaScript Automation - Demo: https://imgur.com/a/Zisav
#!/usr/bin/env osascript -l JavaScript
/**
* Delete silence from Final Cut Pro timeline using a script.
* Demo: https://imgur.com/a/Zisav
*
* This script accepts an ffmpeg silencedetect log as input.
*
* To setup, have fcp running along with your clip selected. Ensure that the
* timecode will start at zero before running this script. That is, if your clip
@alewolf
alewolf / search-results.php
Last active May 30, 2023 23:45
SearchWP Live Ajax Search results with thumbnails
<?php
/**
* This template adds thumbnails to your SearchWP Live Ajax Search results.
*
* Create a folder called searchwp-live-ajax-search in your child theme folder and copy this file in there.
* In order for this to work you require the SearchWP and SearchWP Live Ajax Search plugins installed and active.
*
*/
?>
@jcamp
jcamp / video-editors-opensource.md
Last active April 25, 2024 12:40
OpenSource Video Editors
@bekarice
bekarice / registration-order-link-for-woocommerce.php
Last active August 16, 2023 06:13
Automatically link previous orders to new WooCommerce customer accounts upon registration
@shibaku
shibaku / Folder Path reference.scpt
Last active September 22, 2022 00:55
Applescript to return name, path, and path to parent folder of a given folder in Finder.
tell application "Finder"
set FolderPath to (choose folder) -- sets file path to folder you select
set ParentFolder to container of FolderPath -- sets the parent folder of the folder you select
set Foldername to name of folder FolderPath -- sets the folder name as text
display dialog FolderPath as text
display dialog ParentFolder as text
display dialog Foldername as text