Skip to content

Instantly share code, notes, and snippets.

@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@jccovey
jccovey / HarvestDates.py
Created December 20, 2011 00:21
Sublime Text 2 plugin to find and copy all timestamps to a scratch buffer
import sublime, sublime_plugin
class HarvestDates(sublime_plugin.TextCommand):
def run(self, edit):
date_matches = self.view.find_all("\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}:\d{2} (am|pm)")
date_buffer = self.view.window.new_file()
date_buffer.insert(0, 0, date_matches)