Skip to content

Instantly share code, notes, and snippets.

@marcroberts
marcroberts / watch.rb
Created October 7, 2016 11:02
something for watching files in the current directory
#!/usr/local/bin/ruby
require 'rubygems'
require 'inotify'
i = Inotify.new
last_events = {}
@marcroberts
marcroberts / delete_old_files.sh
Created October 30, 2025 16:01
Script to delete files older than x days
#!/bin/bash
# Script to delete files older than X days from a specified folder
# Configuration
FOLDER_PATH="/path/to/your/folder"
DAYS_OLD=30
# Validate folder exists
if [ ! -d "$FOLDER_PATH" ]; then