Skip to content

Instantly share code, notes, and snippets.

Avatar

Robin Gower Robsteranium

View GitHub Profile
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active Sep 16, 2020
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!
View whiteboardCleaner.md

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 Jun 19, 2012
Wrap an iPhone portrait screenshot in an iPhone via http://bit.ly/iphoneshot#http://i.imgur.com/MwnZF.png
View index.html
<!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 Jun 10, 2012
Allow CORS with python simple http server
View cors_server.py
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
You can’t perform that action at this time.