A shared folder with AI prompts and code snippets
From workspace: Replit
Team: AI Prompts
Total snippets: 5
5 snippets
Write a Python script to batch rename files with a prefix.
Write a script to: – Rename all `.txt` files in a folder – Add prefix 'renamed_' to each filename – Show before/after filenames Use pathlib or os.
Build a Node.js CLI tool using Commander.js.
Build a CLI in Node.js with Commander.js that: – Has a command `hello` that takes a `--name` flag – Prints `Hello, [name]!` Show install and run instructions too.
Generate a shell script that sends a warning if disk usage exceeds 90%.
Create a shell script that: – Checks disk usage – Prints warning if > 90% – Can be run via cron Add comments for each part.
Generate a Python CLI tool that accepts arguments using argparse.
Write a Python CLI that: – Accepts two numbers – Has a flag for addition or subtraction – Prints the result Use argparse for argument parsing.
Write a Bash script to back up a folder into a timestamped archive.
Write a Bash script to: – Accept a folder path as an argument – Create a .tar.gz backup with a timestamp – Save it in a 'backups' directory Make the script safe and reusable.