This file contains hidden or 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 hidden or 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
(defn get-free-port [] | |
(with-open [socket (ServerSocket. 0)] | |
(.getLocalPort socket))) |
This file contains hidden or 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
tell application "Adium" | |
repeat with c in every contact | |
set blocked of c to true | |
end repeat | |
end tell |
This file contains hidden or 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 url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap'); | |
/* Waveform container styling */ | |
#root { | |
background-color: #f9f9f9; | |
} | |
body { | |
font-family: 'Montserrat', sans-serif; | |
} |
This file contains hidden or 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
# Created new Autopilot cluster | |
# https://docs.gitlab.com/runner/install/kubernetes.html | |
# Create a runner at https://gitlab.com/groups/GROUP/-/runners | |
wget https://github.com/derailed/k9s/releases/download/v0.28.2/k9s_Linux_amd64.tar.gz | |
tar xvfz k9s*gz | |
gcloud container clusters get-credentials CLUSTER --region REGION --project PROJECT | |
helm repo add gitlab https://charts.gitlab.io | |
helm repo update gitlab |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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}`; | |
NewerOlder