This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WaveSurfer from 'https://cdn.jsdelivr.net/npm/wavesurfer.js@7/dist/wavesurfer.esm.js'; | |
appsmith.onReady(() => { | |
const wavesurfer = WaveSurfer.create({ | |
container: '#root', | |
waveColor: '#4F4A85', | |
progressColor: '#383351', | |
url: '[url with cors setup]', | |
}); | |
document.getElementById('startButton').addEventListener('click', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download from http://sourceforge.net/projects/aria2/files/stable/aria2-1.19.0 | |
sudo yum install gcc-g++ openssl-devel -y | |
tar xvfj aria2...tar.bz2 | |
./configure | |
make -j$(nproc) | |
sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
# Input file name | |
input_file="input.mp4" | |
# Output file name | |
output_file="output.mp4" | |
# Duration of each segment in seconds (5 minutes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -maxdepth 1 -name "*.pdf" -exec mdls -name kMDItemNumberOfPages {} \; | awk '/kMDItemNumberOfPages/ {sum += $3} END {print sum}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import base64 | |
import os | |
import sys | |
from urllib.parse import urlparse | |
import requests | |
def fetch_url(url): | |
try: | |
response = requests.get(url, timeout=10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function deleteAllConversations() { | |
const organizationId = 'XXXXXXX'; | |
const conversations = await fetch(`https://claude.ai/api/organizations/${organizationId}/chat_conversations`) | |
.then(response => response.json()); | |
console.log(`Found ${conversations.length} conversations to delete.`); | |
for (const conversation of conversations) { | |
const deleteUrl = `https://claude.ai/api/organizations/${organizationId}/chat_conversations/${conversation.uuid}`; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://unix.stackexchange.com/questions/34248/how-can-i-find-broken-symlinks | |
find . -type l ! -exec test -e {} \; -print |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.webm; do [ ! -f "${i%.webm}.slow.mp4" ] && ffmpeg -i "$i" -vf "setpts=1/0.69*PTS" -af "atempo=0.69" -c:v libx264 -preset ultrafast -crf 23 -c:a aac -b:a 128k "${i%.webm}.slow.mp4"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns simba | |
(:require [clojure.java.jdbc :as j]) | |
(:import (com.simba.googlebigquery.jdbc42 Driver))) | |
(def conn {:classname "com.simba.googlebigquery.jdbc42.Driver" | |
:subprotocol "bigquery" | |
:subname "//https://www.googleapis.com/bigquery/v2:443;ProjectId=MY-PROJECT-ID;OAuthServiceAcctEmail=USERNAME@PROJECT.iam.gserviceaccount.com;OAuthPvtKeyPath=PATH-TO-P12-FILE"}) | |
(defn run-query [query] (j/query conn [query])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -e MINIO_ACCESS_KEY=minio -e MINIO_SECRET_KEY=miniostorage -p 9000:9000 minio/minio server /export | |
cat >>~/.aws/config | |
[profile minio-play] | |
region = us-east-1 | |
s3 = | |
signature_version = s3v4 | |
cat >>~/.aws/credentials | |
[minio-play] |
NewerOlder