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

@coreyhaines
coreyhaines / .rspec
Last active April 11, 2024 00:19
Active Record Spec Helper - Loading just active record
--colour
-I app
@searls
searls / cash-register-problem.md
Created September 7, 2011 23:08
Cash Register Kata

Cash Register Problem

A cash register has a drawer with separate bins for eight different denominations of money:

  • Pennies
  • Nickels
  • Dimes
  • Quarters
  • Singles
  • Fives
@napcs
napcs / README.md
Created May 6, 2011 04:10
Deploying Rails to Linode

Deploying Rails to Linode

Installing Ruby Enterprise Edition, Apache, MySQL, and Passenger for deploying Rails 3.0 applications.

Get a Linode, and set it up with Ubuntu 10.04 LTS so that you have till April 2013 to get updates. Once the Linode is formatted, boot it and continue on.

Set up an 'A' record in your DNS, pointing to the IP of your Linode. I'm using demo.napcs.com here.

Initial setup

@gilles
gilles / rpm_extra.rb
Created January 19, 2011 17:13
Trace extra methods in rpm, add the file as a rails initializer
#trace mongo in RPM
Mongo::Collection.class_eval do
include NewRelic::Agent::MethodTracer
add_method_tracer :find
add_method_tracer :find_one
add_method_tracer :find_and_modify
add_method_tracer :update
add_method_tracer :insert
add_method_tracer :save
add_method_tracer :remove