Skip to content

Instantly share code, notes, and snippets.

View Robsteranium's full-sized avatar

Robin Gower Robsteranium

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

@johan
johan / index.html
Created June 19, 2012 17:44
Wrap an iPhone portrait screenshot in an iPhone via http://bit.ly/iphoneshot#http://i.imgur.com/MwnZF.png
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS3 iPhone v0.1 &middot; CodePen</title>
<style>
html, body {
height: 100%;
}
@enjalot
enjalot / cors_server.py
Created June 10, 2012 06:19
Allow CORS with python simple http server
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or