Skip to content

Instantly share code, notes, and snippets.

@msadig
msadig / ralph.sh
Created January 14, 2026 16:16
Ralph - Autonomous AI Coding Agent Loop
#!/bin/bash
# Ralph - Autonomous AI Coding Agent Loop
#
# This script runs an automated development loop using Claude CLI to work through
# tasks defined in a PRD (Product Requirements Document). Each iteration, Claude
# finds the highest-priority task, implements it, runs tests, updates documentation,
# and commits changes.
#
# Inspired by:
# - https://www.aihero.dev/getting-started-with-ralph
@msadig
msadig / statusline.sh
Last active April 16, 2026 13:52
Claude Code statusline
#!/bin/bash
# Enhanced Claude Code statusline with session-specific context tracking
input=$(cat)
# Extract basic values using jq with safe defaults
MODEL_ID=$(echo "$input" | jq -r '.model.id // ""')
MODEL_DISPLAY=$(echo "$input" | jq -r '.model.display_name // "Claude"')
PROJECT_DIR=$(echo "$input" | jq -r '.workspace.project_dir // ""')
CURRENT_DIR=$(echo "$input" | jq -r '.workspace.current_dir // ""')
SESSION_ID=$(echo "$input" | jq -r '.session_id // ""')
@msadig
msadig / README.md
Last active March 22, 2026 00:38
Claude Code Skill - Video Input

Video Input Skill

Video Input Skill

A Claude skill that enables deep analysis and understanding of video content through automated frame extraction, audio transcription, and intelligent content matching.

What are Skills?

Skills are reusable capabilities that extend Claude's functionality for specific tasks. They provide Claude with structured knowledge about how to approach domain-specific problems, ensuring consistent and effective responses.

@msadig
msadig / VisionLibrary.py
Created September 19, 2022 12:24 — forked from datakurre/VisionLibrary.py
Clicking Selenium elements with OpenCV library
from robot.libraries.BuiltIn import BuiltIn
import cv2
import shutil
import tempfile
class TemporaryDirectory(object):
def __enter__(self):
self.name = tempfile.mkdtemp()
@msadig
msadig / Create branch from issue.md
Last active July 26, 2021 08:49
TamperMonkey Script: Github - Create branch from issue
@msadig
msadig / image_migration.py
Last active February 19, 2021 08:23
Download content of directory from FTP server
# -*- coding: utf-8 -*-
import ftplib
import os
from time import sleep
SERVER_URL = ""
USER = ""
PASSWORD = ""
SRC_FOLDER = os.environ.get("SRC_FOLDER", "PUTFILESHERE/images/products")
#include <Key.h>
#include <Keypad.h>
#include <DS3231.h>
#include <Servo.h>
#include <LiquidCrystal.h>
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Three columns
// Define the Keymap
@msadig
msadig / tweet-pic.gs
Created June 21, 2018 15:01
Post media files to Twitter using Google Apps Script
function getTwitterService() {
// Check https://github.com/gsuitedevs/apps-script-oauth1#usage
// for the docs
return OAuth1.createService('twitter')
// Set the endpoint URLs.
.setAccessTokenUrl('https://api.twitter.com/oauth/access_token')
.setRequestTokenUrl('https://api.twitter.com/oauth/request_token')
.setAuthorizationUrl('https://api.twitter.com/oauth/authorize')
// Set the consumer key and secret.
@msadig
msadig / docker-cleanup
Last active August 30, 2023 07:58 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
exited_containers() {
[ "$(docker ps -f status=exited -q)" ] && docker rm $(docker ps -f status=exited -q)
}
tangled_images() {
@msadig
msadig / docker-install.sh
Last active August 30, 2023 10:30
Install docker and docker compose
#!/bin/sh
DOCKER_COMPOSE_V=1.26.2
# Install Docker
# ref: https://github.com/docker/docker-install
# wget -qO- https://get.docker.com/ | sh
curl -fsSL get.docker.com -o get-docker.sh
bash get-docker.sh