Skip to content

Instantly share code, notes, and snippets.

View aruseni's full-sized avatar
🟢
Lead Python Software Engineer

aruseni

🟢
Lead Python Software Engineer
View GitHub Profile
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
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

@jtiai
jtiai / jsondumps.py
Created February 21, 2013 07:28
Django template filter to output any object as JSON
from django import template
from django.utils.safestring import mark_safe
import json
register = template.Library()
@register.filter(name='json')
def json_dumps(data):
return mark_safe(json.dumps(data))