Skip to content

Instantly share code, notes, and snippets.

View tomkersten's full-sized avatar

Tom Kersten tomkersten

View GitHub Profile

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

@tomkersten
tomkersten / orig.json
Last active August 29, 2015 14:04
JS Object -> UBER
{
'identifier': '3220l',
'name': 'Deck chair',
'tidbit': 'You sit on it'
'description': '1-2 sentences of descriptive text. Right here.'
'specification': '[...a really long chunk of structured text...]'
'related_products': [
{
id: 'c7028k',

Keybase proof

I hereby claim:

  • I am tomkersten on github.
  • I am tomkersten (https://keybase.io/tomkersten) on keybase.
  • I have a public key whose fingerprint is DA11 D702 B2C4 822B BBC4 33CE CBE8 A014 62E9 51ED

To claim this, I am signing this object:

#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
#
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
def new
#send .nil? then you can stub that on @billing_information
if !user.billing_information.nil?
user.build_billing_information
user.billing_information.first_name = user.first_name
user.billing_information.last_name = user.last_name
user.billing_information.postal_code = user.profile.postal_code
end
define_subscription_details
end
#!/usr/bin/env python
from optparse import OptionParser
import os, sys, string
from cStringIO import StringIO
import urllib2, urllib, subprocess, pprint
optparser = OptionParser("usage: %prog [-p] file1 file2 file3\n\nPass files to me and I'll post them to http://gist.github.com")
optparser.set_defaults(gistread="", debug=False)
optparser.add_option( "-p", "--private",
#!/usr/bin/perl
$pid = 0;
open I, "ps -axww -U $ENV{'USER'} |";
while (<I>)
{
if (/Aquamacs Emacs/ && !/grep/)
{
#!/usr/bin/env python
from optparse import OptionParser
import os, sys, string
from cStringIO import StringIO
import urllib2, urllib, subprocess, pprint
optparser = OptionParser("usage: %prog [-p] file1 file2 file3\n\nPass files to me and I'll post them to http://gist.github.com")
optparser.set_defaults(gistread="", debug=False)
optparser.add_option( "-p", "--private",
require 'rubygems'
require 'irb/completion'
require 'irb/ext/save-history'
require 'utility_belt'
IRB.conf[:SAVE_HISTORY] = 300
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
IRB.conf[:PROMPT_MODE] = :SIMPLE
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]