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
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
for i in {1..100}; do | |
curl -L -o $i.jpg $(ruby -e 'puts "https://picsum.photos/" + (rand(1..100) * 10).to_s + "/" + (rand(1..100) * 10).to_s') | |
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
gcloud compute instances stop "instance-xxx" --zone="zzz" --project="project-yyy" | |
gcloud beta compute instances set-scopes "instance-xxx" --scopes=storage-full --zone="zzz" --project="project-yyy" | |
gcloud compute instances start "instance-xxx" --zone="zzz" --project="project-yyy" | |
gcloud compute ssh --zone "zzz" "instance-xxx" --project "project-yyy" -- -L 8080:localhost:8080 | |
# on the remote machine | |
gcloud init | |
export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s` |
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 -euo pipefail | |
# Define directories | |
video_dir="./video" | |
audio_dir="./audio" | |
# Create an array of all opus files | |
mapfile -t music_files < <(find "$audio_dir" -type f -name '*.opus') |
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 Google Takeout/Gmail | |
- apt-get install mutt mb2md mboxgrep | |
- mb2md -s $PWD/all.mbox -d $PWD/maildir | |
- mboxgrep -m maildir -H -E "From:.+(a|b|c)@" -o out.mbox maildir | |
- mutt -f out.mbox |
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
alias runlike="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike" | |
for i in $(sudo docker ps | awk '{print $1}' | tail -n +2); do runlike $i; 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
"use strict"; | |
const runner = (module.exports = {}); | |
/** | |
* The Pa11y versions supported by this runner. | |
* @public | |
* @type {Array} | |
*/ | |
runner.supports = "^6.0.0 || ^6.0.0-alpha || ^6.0.0-beta"; |
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
from google.cloud import firestore | |
from datetime import datetime | |
import json | |
import concurrent.futures | |
from tqdm import tqdm | |
import math | |
client = firestore.Client(database="xxxxx", project="xxxxx") | |
NewerOlder