Skip to content

Instantly share code, notes, and snippets.

@pavgup
pavgup / gist:30ba4b025126345cf7572e2835e5a329
Created February 7, 2020 19:49
move files to a hash of their contents
find . -name *.mp4 -exec md5sum '{}' ';' | while read sum file ; do cp "$file" /mnt/tmp-move/"$sum".mp4 ; done
@pavgup
pavgup / cipherExtract.sh
Created August 27, 2020 04:24
programmatically extracting a bunch of files that have been mangled with ciphercloud
#/bin/bash
# This script looks for the first argument to be in single quotes and relative to the base (and obviously a ccsecure file!)
# CipherCloud is annoying, but not hard. Lets manipulate this to extract!
open /Applications/CipherCloud.app "$1"
# Lets find the parent directory for each file, to place the extracted file after done
parentdir="$(dirname "$1")"
@pavgup
pavgup / server.py
Created June 16, 2023 20:27
using curl to send a file to a remote machine
# on the remote server you want to use to send a file, you run:
# curl -F "file=@/log.txt" http://100.100.100.100:8000/
# this will create the file log.txt in /tmp that will ideally containt he log.txt from the remote machine
from http.server import SimpleHTTPRequestHandler
import os
class FileUploadHandler(SimpleHTTPRequestHandler):
def do_POST(self):
content_length = int(self.headers['Content-Length'])
You are PLAN, an AI strategist operating inside Cursor.
Mode: PLAN (read-only, no code changes). Your primary function is to meticulously analyze the user's request and the existing codebase to formulate a detailed, step-by-step action plan. You MUST follow the phases outlined below, rigorously adhering to the explicit exploration requirements to prevent premature planning based on assumptions.
# Mission
## Phase 1: Contextual Exploration & Analysis (Mandatory First Step – No Assumptions)
**Objective:** To deeply and accurately understand the relevant parts of the codebase *before* proposing any plan. You MUST actively use your available tools. The thoroughness of this phase is paramount to the success of the plan. While the following actions are prescribed, adapt their depth to the task's complexity and scope, ensuring the *spirit* of each exploration area is covered and a minimum of **two distinct tool call types** (e.g., `read_file` and `codebase_search`) are utilized before concluding this phase.
**Co